Questions tagged [fitbounds]
92 questions
1
vote
1 answer
Google maps fits bound in fullscreen
I have a problem with Google Maps in fullscreen : when it needs to fit the bounds of markers it works in the small div, but in fullscreen it fits like it was in the small div again.
What I need is that it "zooms in to fits bounds" when I go…

Guile
- 1,473
- 1
- 12
- 20
1
vote
0 answers
How to set fitbound/ max zoom from boundary location by google static map api
I am beginner to using google map api.
my work is to get image from specific crop plant boundary, and do image processing for their vegetation index. But each plant field have different area size so I need to adjust the zoom level to cover all…

jokk
- 11
- 1
1
vote
1 answer
Google Maps: full screen + fitBounds does not fit bounds
I have a map displaying the markers with markerClusterer.
Everything works fine in the normal view, but in full screen mode the click on the cluster runs the "fitBounds" and the zoom is not changed correctly (Zoom out happens instead of zoom…

Victor Soares
- 757
- 1
- 8
- 34
1
vote
1 answer
Google Maps v3 fitBounds inconsistent zoom
having a very strange problem.
A: One method of my map works fine. User sets start point and end point and map is created and the fitBounds.extend(bounds) sets zoom level appropriately to encompass the start/end markers on the map.
B: The second…

rolinger
- 2,787
- 1
- 31
- 53
1
vote
2 answers
Google Maps JS API - How to use fitBounds for responsive map?
I'm trying to show a certain area in a map in a responsive website.
I want it to display the same area, when loaded, whatever is the window size, by zooming in and out.
After some research I understood I need to use the fitBounds function of the…

Aise
- 173
- 2
- 13
1
vote
0 answers
Marker not displayed on Map until pan or zoom
I have only one marker to be displayed on the map. I got the marker LatLng and added to the map by extending the LatLngBounds for the marker's poistion and fit the bounds to the map.
Here is the snippet I used,
GoogleMap map =…

Raul
- 139
- 1
- 6
- 17
1
vote
1 answer
Trying to get google maps to zoom and center, can't get my head round it
I've got a piece of code here that plots a group of paths on a map. I'm trying to get the map to zoom and centre so all the paths are visible, but I can't get anything to work. Here's what the code looks like before I started:
var points = new…

ninjachicken1
- 177
- 1
- 1
- 10
1
vote
2 answers
I don't want fit to bounds when directionsDisplay.setDirections(response)
I have a site with GPS and made my own routeplanner. The GPS marker is at the center of the map. Every time the directionsDisplay.setDirections(response) is called its jumping to fit,bounds and back to the GPS marker.
I want to stop the fit.bounds…

user2445842
- 11
- 2
1
vote
1 answer
bounds google maps
My Google maps API map zooms put to show all the markers added after a google places search. On a mobile map this can take a bit to load and as this app for cyclists I prefer to only show the results within the viewport. Most research I read…

Rick
- 61
- 5
- 12
1
vote
2 answers
Google Maps API fitBounds resulting in 0,0 location
I am trying to use the following lines of code to fit the map bounds to the markers:
var latlngbounds = new google.maps.LatLngBounds();
latlngbounds.extend(latlng);
map.fitBounds(latlngbounds);
For some reason the map zooms to location 0,0…

Rynardt
- 5,547
- 7
- 31
- 43
0
votes
1 answer
google map v3 how fitbounds with zoom on user's location
I am using google v3, i want to fitbounds with center on userPinLoc object, i have the following code
var bounds = new google.maps.LatLngBounds();
bounds.extend(userPinLoc)// wants to center on userPinLocation
for (i in…

d-man
- 57,473
- 85
- 212
- 296
0
votes
1 answer
Mapbox GL - How to get the actual bounds of the showed polygons
I'm creating a map where severals polygons are showed and I want to center/autozoom the map according to the showed polygons.
To make it happens I've created a bounds object that I'll extends with the bounds of each polygons like so:
private…

Splinteer
- 1,126
- 4
- 13
- 28
0
votes
0 answers
Issue getting Map to run fitbounds on load
I having an issue trying to resize my map using fitbounds on load.
So I can use handleClick is correctly resizing the map but when I the fitToCustomLayer never works as this.mapRef.current & this.groupRef.current are always null.
How can I get the…

Chris Croft
- 13
- 1
- 4
0
votes
1 answer
curve fit the function
I am trying to curve fit the following equation with parameters d, D, Ar, Tr each of them bounded in some range. The physical constants are: gamma = 26.76E7, n = 6.59E28, Ad = 2.099E-20
The equation is broken into several parts.
#Fitting…

Tawhid
- 1
0
votes
0 answers
How to set view to overlay bounds when overlay added to a map?
I'm loading an overlay ('overlay' in the code below) onto a leaflet base map (openstreetmap) and would like that this overlay completely fills the display window once loaded.
I think I should use getBounds and setView using values gotten through…

Laurent
- 31
- 9