Hi,
I center my map base on initial coordinates and it works perfect:
I was wondering if there is an option to center map base on certain address like "London, 10 Downing Street"?
Solved! Go to Solution.
No there is no option to center the map on an address. You easiest option is to Google the lat and lon for that address ahead of time and enter it. Another option would be to set the map center in code after the app initializes by using a Locator class and the adressToLocations method.
No there is no option to center the map on an address. You easiest option is to Google the lat and lon for that address ahead of time and enter it. Another option would be to set the map center in code after the app initializes by using a Locator class and the adressToLocations method.
Hi Magdalena Chmura,
Another option of course would be to add a Search widget to the map, allowing users to enter an address to center the map themselves.
Inspired by your sample address (London, 10 Downing Street) I have created a little sample app using UK maps from Ordnance Survey.
The projection of this map is British National Grid (EPSG:27700). Address Search has been limited by applying countryCode:"GBR".
You can see the app (and the source) here:
ArcGIS JavaScript with UK data - Search address in the United Kingdom
Best regards,
Egge-Jan