map point lat/long coordinate system

615
1
Jump to solution
04-27-2012 12:36 PM
AsifNawaz
New Contributor
I imported flex viewer based application in flex that used some local map service. In this application the latitude and longitude are accessed using mappoint.y and mappoint.x, but when i imported this application in some other system and used following map service

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer

here mappoint.y and mappoint.x donot displays latitude and longitude values, instead it displays a large number.

In existing application map point are accessed using MapMouseClick event as
var mapPoint:MapPoint=map.toMapFromStage(event.stageX, event.stageY);

where mapPoint.y should display longitude and mapPoint.x should display latitude. Should I change map service in flex viewer or what else without any change in my application. Is it problem of map service? if yes, then what map service should I use without any change in application code.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Asif,

If you have a Flex Viewer and/or Widget question than you need to post to the Flex Viewer forum and not here in the general Flex API forum:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

   It is a matter of what WKID (spatial Reference) the map service that is first loaded into the map is in. The Map Service you referenced in your post is in NAD_1983_StatePlane_Michigan_South_FIPS_2113_IntlFeet so it is not going to display Lat Lon when it is in State Plane Feet. Most of the common base maps are in 102100 Web mercator which is meters and not decimal degrees either.

If you want the MapPoint to be in decimal degrees lat, lon than you have to have WKID: 4326, WGS 1984 Geographic basemaps like:

http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer
http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Asif,

If you have a Flex Viewer and/or Widget question than you need to post to the Flex Viewer forum and not here in the general Flex API forum:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

   It is a matter of what WKID (spatial Reference) the map service that is first loaded into the map is in. The Map Service you referenced in your post is in NAD_1983_StatePlane_Michigan_South_FIPS_2113_IntlFeet so it is not going to display Lat Lon when it is in State Plane Feet. Most of the common base maps are in 102100 Web mercator which is meters and not decimal degrees either.

If you want the MapPoint to be in decimal degrees lat, lon than you have to have WKID: 4326, WGS 1984 Geographic basemaps like:

http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer
http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos