Questions tagged [fitbounds]
92 questions
2
votes
0 answers
Google Maps API: Uncaught TypeError: Object # has no method 'fitBounds'
i'm trying to do a map with Google Maps Api v3.
I have the map working, with the markers loaded ok from a XML file.
But i need to center view to see all markers, I use this:
var map = new google.maps.Map(document.getElementById("map"));
var bounds =…

Xavier Garcia Rubio
- 105
- 3
- 10
2
votes
1 answer
How to prevent with mapbox gl js, that a mouse wheel interaction stops a fitBounds() animation?
I add some marker to a mapbox map and let the fitBounds() method from geojson-extent.js adjust the map position and zoom.
map.fitBounds( geojsonExtent(geojson), {
padding: {top: 200, bottom:30, left: 30, right: 30}
});
The animation duration is…

Tilo Neumann
- 21
- 4
2
votes
0 answers
Do not fire 'zoom_changed' event when fitbounds() is in used
In my init i have some thing like this
google.maps.event.addListener(gmap, 'zoom_changed', function(){
GMapPlot.getSwNe(window.gmap.getBounds());
//GMapPlot.rePlotMap(presentPlaceType);
});
and at some point i have…

vetri02
- 3,199
- 8
- 32
- 43
2
votes
1 answer
Center map and zoom to fit the markers on the screen
I have the following code to detect the visitors GPS position and show it on the Google Maps JavaScript v3 map. Everything works as I want it but the code will not center or zoom as I want - it simple use the standard position (right over Asia)! I…

Airikr
- 6,258
- 15
- 59
- 110
1
vote
3 answers
Javascript Google map api V3 fitbounds with center location
I want to fitbound pushpins to visible all around user's location pushpin. i wrote the following code it center the user location but few pushpin goes out of map ??
FYI: userPinLoc is pushpin object which is already populated
function…

d-man
- 57,473
- 85
- 212
- 296
1
vote
1 answer
fitbounds for google maps api v3 doesn't center on my polylines
I want to be able to center zoom on all my polylines for my site.
Also, I'd like to add markers to each of these new coordinate pairs. I've seen lots of examples for multiple markers and multiple plygons, but never for polylines and I can't get…

import-antigravity
- 151
- 1
- 6
- 17
1
vote
0 answers
nothing happened when I put leaflet fitBounds to my map
to make WFS map