Skip to main content
Formatting etc
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

How to set center of map in Arcgis javascriptArcGIS API for JavaScript using Lat Long?

I am using Arcgis javascript API for my map where map is coming from arcgis online using map by ID. Now I want to set map center using Lat long,For this I am using this method to set map center

   map.centerAt(42.58,78.25);
 
But this method is not working for me.
Is anybody know How to set map center using Lat Long In Arcgis javascript API.

Thanks
 

But this method is not working for me. Does anybody know how to set map center using Lat Long In Arcgis javascript API.

How to set center of map in Arcgis javascript using Lat Long

I am using Arcgis javascript API for my map where map is coming from arcgis online using map by ID. Now I want to set map center using Lat long,For this I am using this method to set map center

   map.centerAt(42.58,78.25);
 
But this method is not working for me.
Is anybody know How to set map center using Lat Long In Arcgis javascript API.

Thanks
 

How to set center of map in ArcGIS API for JavaScript using Lat Long?

I am using Arcgis javascript API for my map where map is coming from arcgis online using map by ID. Now I want to set map center using Lat long,For this I am using this method to set map center

   map.centerAt(42.58,78.25);

But this method is not working for me. Does anybody know how to set map center using Lat Long In Arcgis javascript API.

Source Link

How to set center of map in Arcgis javascript using Lat Long

I am using Arcgis javascript API for my map where map is coming from arcgis online using map by ID. Now I want to set map center using Lat long,For this I am using this method to set map center

   map.centerAt(42.58,78.25);

But this method is not working for me.
Is anybody know How to set map center using Lat Long In Arcgis javascript API.

Thanks