Select to view content in your preferred language

How to show both tiled map services on the same map?

886
3
Jump to solution
07-19-2012 08:09 AM
LeiZhou
Deactivated User
I have several tiled map services (e.g., population, land use) that I need to let users to select so that they can show up on the map.  But I also need to show the base map like street map as background, which is also a tiled map service.  Since they are all tiled and I guess I have to use <esri:ArcGISTileMapServiceLayer>, my question is that how can I show both base map(street map) and my own map(population) on the same map? Thanks!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ChristopherBlinn1
Deactivated User
As long as the two services are cached at the same levels they should draw on top of one another.  I have tiled map services draw on top of each other.  I use the Flex Viewer (version 2.5) for most of my websites.

For instance I have a basemap and flood zones that show together.

If you are using the viewer, just place your tiled service in the operational layers.  For example:

<basemaps> <layer label="My Basemap"            type="tiled"           visible="true"          url="http://server/ArcGIS/rest/services/BASEMAP/MapServer"/> </basemaps> <operationallayers> <layer label="Flood Zones"            type="tiled"           visible="true"          url="http://server/ArcGIS/rest/services/FloodZones/MapServer"/> </operationallayers>


I'd attach the MapMananager.mxml from the viewer, but it is quite extensive.

In theory, as long as you place the services in the proper drawing order then you both should draw on top of one another.

Another thing is make sure your cache tiles are in a PNG format because JPEG's do not support transparency.

Hope this helps!

Best,
Chris B.

View solution in original post

0 Kudos
3 Replies
AustinDavis
Occasional Contributor
I usually toggle my basemaps using a button bar.
0 Kudos
ChristopherBlinn1
Deactivated User
As long as the two services are cached at the same levels they should draw on top of one another.  I have tiled map services draw on top of each other.  I use the Flex Viewer (version 2.5) for most of my websites.

For instance I have a basemap and flood zones that show together.

If you are using the viewer, just place your tiled service in the operational layers.  For example:

<basemaps> <layer label="My Basemap"            type="tiled"           visible="true"          url="http://server/ArcGIS/rest/services/BASEMAP/MapServer"/> </basemaps> <operationallayers> <layer label="Flood Zones"            type="tiled"           visible="true"          url="http://server/ArcGIS/rest/services/FloodZones/MapServer"/> </operationallayers>


I'd attach the MapMananager.mxml from the viewer, but it is quite extensive.

In theory, as long as you place the services in the proper drawing order then you both should draw on top of one another.

Another thing is make sure your cache tiles are in a PNG format because JPEG's do not support transparency.

Hope this helps!

Best,
Chris B.
0 Kudos
LeiZhou
Deactivated User
I usually toggle my basemaps using a button bar.


Thanks a lot!
0 Kudos