Select to view content in your preferred language

Help with basemap/map server please

491
2
11-12-2011 07:19 AM
McCainMcMurray
Deactivated User
I have just started working with the ArcGIS Viewer for Flex and would greatly appreciate some help with an issue I am having. I am not sure of the terminology, but here goes. I found a basemap/map server for New Zealand topo maps at this address:

http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer

I added this service to my main config file using the following code:

<basemaps>
<layer label="Topo" type="tiled" visible="true" url="http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"/>
<layer label="NZ Topo" type="tiled" visible="false" url="http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer"/>
<layer label="Aerial" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
<layer label="Streets" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
</basemaps>

When I select the NZ Topo basemap from my map switcher, the map is entirely gray. I would really appreciate any help fixing this issue.

Thanks
McCain
Tags (2)
0 Kudos
2 Replies
BjornSvensson
Esri Regular Contributor
The tiles for the NZ map service has been created in a different projection.  You can see this at http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer where it says "Spatial Reference: 2193".

The flex viewer does not re-project cached services.

You have two options, the best one is to just use services in that projection, for example:
<map wraparound180="true" top="40">
    <basemaps>
        <layer label="NZ Topo" type="tiled" visible="true" url="http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer"/>
    </basemaps>


The other solution is to request a dynamicly created map from the LINZ service. This will not look as good, nor perform as well:
<map wraparound180="true" top="40">
    <basemaps>
        <layer label="Streets" type="tiled" visible="true"
               url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        <layer label="NZ Topo" type="dynamic" visible="false" 
                url="http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer"/>
        <layer label="Aerial"  type="tiled" visible="false"
               url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
        <layer label="Topo"    type="tiled" visible="false"
               url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
    </basemaps>
(make sure that the NZ service is not listed first, in which case the map will use the LINZ projection and the tiled from ArcGIS Online services will not work)
0 Kudos
McCainMcMurray
Deactivated User
Thank you very much. Your solution worked perfectly.

Cheers
McCain
0 Kudos