Select to view content in your preferred language

Change Spatial Reference in ArcGIS Viewer

2853
3
Jump to solution
05-12-2013 10:29 PM
JoeHewitt
Regular Contributor
Hi,

I am trying to change the spatial reference of my basemap in ArcGIS viewer for Flex.
I have made my streets and imagery basemaps dynamic in the config file:

 <map attributionvisible="true" esrilogovisible="true" openhandcursorvisible="false" scalebarvisible="true" scalebar="default" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="false" initialextent="108 -45 155 -10" fullextent="-20000000 -20000000 20000000 20000000" wkid="4283" top="40" portalurl="https://www.arcgis.com">         <basemaps>             <layer type="dynamic" label="Imagery" icon="assets/images/basemap_imagery.jpg" imageformat="png8" url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" visible="true"/>             <layer type="dynamic" label="Streets" icon="assets/images/basemap_streets.jpg" imageformat="png8" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" visible="false"/>         </basemaps>     </map>


And you can see I set my wkid="4283"

However when I open my ArcGIS Viewer and go to preview, it loads my imagery basemaps but it is still in SpatialReference = 102100. I know this because I have altered my coordinate widget to display the spatial reference wkid alongside the coordinates.

I dont understand why, this works fine in my Flex API in flashbuilder, but when it comes to the viewer maybe I am missing something I have to alter in the Basemaps & Operational Layers, I was thinking config would do everything for me.

Can anyone offer me some help?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Juan_CarlosFranco
Esri Contributor
This bug was introduced by issue #80 (URL Parameters: Support projection of center/extent). The problem is that the extent/center projection logic prevents the map's spatial reference from being set and therefore is ignored when trying to determine if the extent needs to be projected or not.

We've created issue #131 for this.

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Joe,

   Not sure why but in FV3.1 & 3.2 what you have works and in 3.3 it does not... Maybe esri can shed some light.
0 Kudos
Juan_CarlosFranco
Esri Contributor
This bug was introduced by issue #80 (URL Parameters: Support projection of center/extent). The problem is that the extent/center projection logic prevents the map's spatial reference from being set and therefore is ignored when trying to determine if the extent needs to be projected or not.

We've created issue #131 for this.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joe,

   If you have access to change the viewer source code then I can verify that the change the JC made to the source code on GitHub does work for fixing this issue.

https://github.com/Esri/arcgis-viewer-flex/issues/131
0 Kudos