Select to view content in your preferred language

URL producing NaN Lat/Lons and frozen extent

687
4
Jump to solution
03-12-2013 12:43 PM
DavidBrooks3
Deactivated User
http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Viewer_URL_parameters/01m300000...

I can get the above example maps to run fine from my Flex Viewer but unable to get my URL with Lat/Lons to work properly. I am passing Lat/Lons in degrees with a Bing Hybrid base map (see URL example below). The points always go to the same extent and seem to use the MXD last saved extent. Additionally, once the user goes to the extent they are unable to get any information from the features and navigating the map results in snapping back to the initial extent and double clicking results in a blank map. Any ideas?  I can build a URL with lat/lons in Google Map fine.

Below are examples of the URLs I'm building in code and passing. It won't work for you because it's intranet but hope you can see where I'm failing:

http ://website/flexviewers/pathwayreview/index.html?center=47.61899181,-122.10946752&scale=5000
  and
http ://website/flexviewers/pathwayreview/index.html?extent=47.61899181,-122.10946752&scale=5000

Is there a setting in the config that needs to allow passing lat/lons?  Is it a spatial reference issue?  Should I be using something other than x and y degrees WGS_1984? 
Thank you for your time and help,
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor
David,

I noticed the sample page (that Bjorn provided link to) has a zoom to tokyo by center scale example that is in web mercator aux sphere.

using that link with your coordinates (in mercator) puts me right at Keeney Park if I did it correctly.  Here is that same link with your coordinates for an example.  http://resources.arcgis.com/en/help/flex-viewer/live/index.html?center=-13593163.745343,6043701.1052...

Not sure what you are asking about calculating it from feature.  If you are just after the coordinates in mercator, since your map is in mercator, if you enable the coordinate widget that comes with the viewer, you could get the coordinates at cursor from bottom of the flexviewer map.

What I did to make this single point, I added a point data set to ArcMap that was set to WGS84.  then, started editing and put in your coordinate, saved, stopped editing.

Then, I set my dataframe properties to the WGS_1984_Web_Mercator_Auxiliary_Sphere.  Next, I opened the table, right-clicked on my coordinate field to calculate geometry.
Choose the Use coordinate system of the "data frame" from radio button (since that is now aux_shpere) and hit OK.

This calculated the coordinate I selected to the mercator values instead of lat/long.

Is this the info you were after?

R_

View solution in original post

0 Kudos
4 Replies
RhettZufelt
MVP Notable Contributor
No way to test, but it is my understanding that the Bing maps are in web mercator, not lat/long.  Have you tried using web mercator coordinates in the URL instead of Lat/Long?

R_
0 Kudos
DavidBrooks3
Deactivated User
Thank you.  Presently I'm using calculated fields in the feature to generate lat lons.  I did not see Mercator as a conversion option.  Would you please guide me on how to do so?
0 Kudos
RhettZufelt
MVP Notable Contributor
David,

I noticed the sample page (that Bjorn provided link to) has a zoom to tokyo by center scale example that is in web mercator aux sphere.

using that link with your coordinates (in mercator) puts me right at Keeney Park if I did it correctly.  Here is that same link with your coordinates for an example.  http://resources.arcgis.com/en/help/flex-viewer/live/index.html?center=-13593163.745343,6043701.1052...

Not sure what you are asking about calculating it from feature.  If you are just after the coordinates in mercator, since your map is in mercator, if you enable the coordinate widget that comes with the viewer, you could get the coordinates at cursor from bottom of the flexviewer map.

What I did to make this single point, I added a point data set to ArcMap that was set to WGS84.  then, started editing and put in your coordinate, saved, stopped editing.

Then, I set my dataframe properties to the WGS_1984_Web_Mercator_Auxiliary_Sphere.  Next, I opened the table, right-clicked on my coordinate field to calculate geometry.
Choose the Use coordinate system of the "data frame" from radio button (since that is now aux_shpere) and hit OK.

This calculated the coordinate I selected to the mercator values instead of lat/long.

Is this the info you were after?

R_
0 Kudos
DavidBrooks3
Deactivated User
Thank you R,
These were the exact steps I needed to finish my project. 
Thanks again!
david
0 Kudos