Skip to main content

Questions tagged [fitbounds]

The tag has no usage guidance.

fitbounds
0 votes
1 answer
490 views

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 ...
Splinteer's user avatar
  • 1,194
1 vote
0 answers
57 views

nothing happened when I put leaflet fitBounds to my map

to make WFS map <script type="text/javascript"> var map = L.map('map').setView([37.576044, 126.977019], 15); var tiles = L.tileLayer('https://{s}.tile.openstreetmap....
hyunjung_jay's user avatar
1 vote
1 answer
1k views

Use google-map-react fitbounds useRef -> mapRef.current.fitBounds is not a function

I use google-map-react and I want to have the correct zoom and center to the map. To center the map I use the props center on GoogleMapReact component that I can calculate. But for the zoom it is more ...
Lucas Bodin's user avatar
2 votes
0 answers
148 views

Leaflet featureGroup with tracks fitbounds invalid

Is there a better way??? I am adding several tracks to a map (using leaflet-gpx plugin) and want to fit the maps to the bounds of all the added tracks. By using a featureGroup layer to contain the ...
RogerCO's user avatar
  • 41
0 votes
1 answer
224 views

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 ...
Tawhid 's user avatar
1 vote
2 answers
532 views

Mapbox fitBounds does not accept coordinates - stays in Kenya

I just started with MapBox and have this code (simply copied the code from this sample https://docs.mapbox.com/mapbox-gl-js/example/fitbounds/ and replaced the coords): document.getElementById('fit')....
Dev's user avatar
  • 23
3 votes
2 answers
2k views

Dynamic bounds change does not give any effect in 'react-leaflet'

I encountered the problem while trying to use the react-leaflet's bounds property. My use case is that my application has some initial bounds defined in the state (let's say, fallback bounds), and ...
daniel_s's user avatar
  • 3,715
6 votes
4 answers
10k views

Flutter LatLngBounds not showing accurate place

I am trying to show all of my markers into the viewport using my flutter google maps. But it seems not working in my case. I have tried so far as below: _controller.animateCamera(CameraUpdate....
Enayet Hossain's user avatar
-1 votes
1 answer
479 views

How to make map cover all markers in javascript?

I have an issue with Google Map in javascript, I can not make all markers fit bounds. Only the first marker is visible. This is the error thrown in console: uncaught exception: InvalidValueError: ...
Besart's user avatar
  • 399
-1 votes
1 answer
497 views

How to fitBounds groundOverlay google maps api more closely

I created a groundOverlay that uses the Google Maps API. I'd like to make the ground fit much as possible. I also tried to use padding option or zoom++ but it not work as I expected. Current: ...
Binh Ho's user avatar
  • 4,653
2 votes
1 answer
2k views

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, ...
Tilo Neumann's user avatar
0 votes
0 answers
487 views

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 ...
Laurent's user avatar
  • 51
0 votes
1 answer
477 views

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 ...
Lucien's user avatar
  • 63
0 votes
1 answer
2k views

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 ...
Pedro Estevão's user avatar
-2 votes
1 answer
1k views

FitBounds doesnt work in googlemaps javascript

I have a map and a list of markers, each of which has a position in LatLng object. The position is valid because i can see the markers on the map. However i want to fit the map to the markers so i use ...
james04's user avatar
  • 1,830

15 30 50 per page
1
2 3 4 5
7