Current release: 3.9.2
• For EE3 EE4 EE5 EE6 EE7
Maps - JS API general
ExpressionEngine Code
{exp:reinos_maps:html_header} {exp:reinos_maps:map center:address="europa" width="100%" } {exp:reinos_maps:html_footer} $(function(){ REINOS_MAPS.api('geocode', { address : 'heerde|apeldoorn|amsterdam', callback : function(result, type){ result = $.parseJSON(result); $.each(result, function(k,v){ REINOS_MAPS.triggerEvent('addMarker', { mapID : 'reinos_map_1', lat: v.latitude, lng: v.longitude, title: v.city }); REINOS_MAPS.api('addCircle', { mapID : 'reinos_map_1', lat: v.latitude, lng: v.longitude, fillColor : '#BBD8E9', fillOpacity : 0.3, radius : 7000, strokeColor : '#BBD8E9', strokeOpacity : 0.9, strokeWeight : 2, zIndex : 1 }); }); REINOS_MAPS.api('geocode', { address : 'utrecht|hardewijk gelderland', callback : function(result, type){ result = $.parseJSON(result); REINOS_MAPS.triggerEvent('addRectangle', { mapID : 'reinos_map_1', bounds : [[result[0].latitude,result[0].longitude],[result[1].latitude,result[1].longitude]], fillColor : '#BBD8E9', fillOpacity : 0.3, strokeColor : '#BBD8E9', strokeOpacity : 0.8, strokeWeight : 2, zIndex : 1 }); } }); REINOS_MAPS.api('fitMap', { mapID : 'reinos_map_1', zoomLevel : 9 }); } }); });