Questions tagged [fitbounds]
92 questions
0
votes
1 answer
Leaflet, add fitbounds with geoJson
Not really comfortable with JS, i'm trying to add Fitbound function on my project, but i can't manage.
I also have some loading problems only with Firefox, all markers shows in the correct location but the map doesn't load correctely and the center…

Lucien
- 65
- 1
- 7
0
votes
1 answer
Google Maps fitBounds not applying padding when only one point
I'm using Google Maps Javascript API.
Everytime the user search for some place, I show the marker of each place in my map and I use fitBounds to set the viewport to contain the given bounds.
As I have a panel above the map of 400px width on the…

Pedro Estevão
- 982
- 1
- 13
- 41
0
votes
1 answer
Zoom on click in marker using leaflet for more then actions
I have a problem when I try make a zoom on marker, I got a error:
Uncaught TypeError: e.target.getBounds is not a function
var rotas = L.geoJSON(paradas, {
onEachFeature: onEachFeature
}).addTo(map);
function onEachFeature(feature, layer){
…

Elton Santos
- 571
- 6
- 32
0
votes
2 answers
Is Google Maps fitBounds throwing a bug on marker label?
if I add a marker with a label on a Google Maps map and then I call fitBounds to another region, I still continue to see the label without the marker unless I zoom out.
Is it a bug?
Here's a working fiddle, try to click Milano…

Jumpy
- 53
- 5
0
votes
1 answer
FitBounds on fullscreen zooms out to 0
I have a map in div with absolute position inside of a container that is absolute too. Also map's size is calculated from top, bottom, left and right css properties.
Clicking on polyline calls fitBounds on map, and instead of fitting it zooms out to…

Meehanick
- 11
- 1
0
votes
1 answer
Making my google-map fitBounds
I basically want to create maps which zoom in to the size corresponding to the SE-NW corners. I have tried so many variations but have not been able to get it to work. I managed to place two markers on one version of my script but was not able to…

Ann
- 1
- 1
0
votes
1 answer
How to fitBounds map with 2 markers and InfoWindow
i'm need to fitBounds few markers on my map and also need show infowindow on one of them. And all this stuff should be inside map viewport. I'm trying to use this code to get bounds of InfoWindow top left, top right corners and 2 markers:
function…

Anton Konyushevskiy
- 302
- 1
- 13
0
votes
1 answer
Issue to set map in center so multiple marker display
i am using ionic framework. i created map and multiple markers and value came from server side.all data came properly but i don't know why i getting this error-
ionic.bundle.js:25642 TypeError: Cannot read property 'fitBounds' of null
at…

Varshil shah
- 268
- 1
- 6
- 19
0
votes
2 answers
google maps fitBounds callback
I know there is a bounds_changed event that is triggered if the bounds have changed, however I need to know when fitBounds has completed (when bounds have changed or bounds have stayed the same).
Google has some sort of tolerance where if the bounds…

ParoX
- 5,685
- 23
- 81
- 152
0
votes
0 answers
Google Maps API v3 fitBounds() doesn't seem to work with streets, places, etc... Just with cities, regions, countries
Case:
I am displaying a Google Map using the V3 API and let the users type some origin and destination in input fields, which use the autocomplete functionality.
If the user types an origin, a marker is created and placed in the map. The map is…

agustin
- 1,311
- 20
- 42
0
votes
1 answer
Google Maps: Get a variable value from listener
I'm trying to do it in good way, but I can't..
Please tell me where is the problem.
Variable latlng is empty outside the jsondata.addListener..
I want to pass the latlng variable to:
var latlngbounds = new…

kfr
- 13
- 2
0
votes
1 answer
Leaflet AJAX Map FitBounds
I am searching for a solution to fit a leaflet map's bounds to display the content of a loaded geoJSON file.
For loading the file I use leaflet-ajax. I tried already this, but I have no idea how I can get the layer's bounds. Any Suggestions how I…

micha
- 65
- 11
0
votes
1 answer
Google map fitbounds not working with angularjs ng-dialog
I am using ng-Dialog module of angularjs for vehicle trip view map. My angularjs directive for trip-map is working fine and map is loaded with fitbounds in the complete window (not in ng-dialog model popup) but it does not work in ng-dialog popup.…

Janty
- 1,708
- 2
- 15
- 29
0
votes
1 answer
google maps v3 multiple infowindow out of bounds
I got a simple map with 2 markers and 2 infowindows open.
How can i ensure the map will fit to show entire markers and infowindows?
This is the proof of concept.
http://jsfiddle.net/hBeX3/
Depending on the height of the screen (please move up and…

Davide Berra
- 6,387
- 2
- 29
- 50
0
votes
2 answers
Best Elliptical Fit for irregular shapes in an image
I have an image with arbitrary regions shape (say objects), let's assume the background pixels are labeled as zeros whereas any object has a unique label (pixels of object 1 are labeled as 1, object 2 pixels are labeled as 2,...). Now for every…

user84310
- 121
- 1
- 6