mapsapi icon indicating copy to clipboard operation
mapsapi copied to clipboard

map is not centering

Open garifollinad opened this issue 4 years ago • 1 comments

I failed to implement 2gis's own current locator function market.getLatLng(), then I used google's one. In javascript part I took from fragment my longitude and latitude. I made it appear on my alert, everything is working fine, but when map centers with these values, it ends up with "2gis is not supported in your area" error, but sometimes it works. Any ideas?[ Unknown Screenshot 2019-10-07 at 16 14 38

](url)

garifollinad avatar Oct 08 '19 07:10 garifollinad

Your latitude and longitude are set to 0 and zoom to 10, so you can check this location by link https://maps.api.2gis.ru/2.0/?lng=0&lat=0&zoom=10 - you will see same images.

You should get needed coordinates first then initiate the map. Or change default values.

egoroof avatar Oct 08 '19 12:10 egoroof