Set Center on Markers
-
I’ve made a small hack to functions.js to automatically center and zoom the map to the extents of the available markers.
After:
$.bgmp.infoWindowContent = {};
Add:
$.bgmp.bounds = new google.maps.LatLngBounds();
After:
parseInt( bgmpData.markers[ m ][ 'zIndex' ] ) ); }
Add:
$.bgmp.map.fitBounds($.bgmp.bounds);
After:
longitude = parseFloat( longitude.replace( ',', '.' ) );
Add:var latlon = new google.maps.LatLng(latitude, longitude); $.bgmp.bounds.extend(latlon);
Change:
'position' : new google.maps.LatLng( latitude, longitude ),
To:
'position' : latlon,
https://www.ads-software.com/plugins/basic-google-maps-placemarks/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Set Center on Markers’ is closed to new replies.