Online BaseMaps with local Data

2575
3
07-19-2012 01:53 PM
TomGriffith
New Contributor
I have a Mapservice in WGS84 that I'd like to combine with ArcGIS Online services. I'm looking for code samples for the following
1. World_Street_Map services I can combine with my DynamicMap
2. Code to use 2 different projections

What I have is

<esri:Map id="map1">
  <esri:ArcGISDynamicMapServiceLayer url="https://lakap046p2/ArcGIS/rest/services/CIP/BaseMapWGS84/MapServer"/>
  <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
</esri:Map>

I can render one or the other but not both
Thanks...new to FLEX, your help is appreciated
Tags (2)
0 Kudos
3 Replies
RhettZufelt
MVP Frequent Contributor
I put my basemap at the top of the list.  That way, it will pick up on the projection of "my" data.  Then, I just load the arcgisonline services as "dynamic", but below the WGS84 mapservice.  Will slow it down a bit, but can project on the fly.  Don't think it can on the fly tiles that were pre-made in mercator.

R_
0 Kudos
RamaChintapalli
Esri Contributor
Tom,

The tiles from TiledMapServiceLayer cannot be re-projected. Make the tiled map service as the first layer if you want to add other layers with a different spatial reference. If not, have all the layers in the same spatial reference.
0 Kudos
RhettZufelt
MVP Frequent Contributor
Tom,

The tiles from TiledMapServiceLayer cannot be re-projected. Make the tiled map service as the first layer if you want to add other layers with a different spatial reference. If not, have all the layers in the same spatial reference.


Ok, I did get it to work this way as well.  However ALL my services need to be loaded as dynamic for this to work.  I find if you have many other layers on there, loading the arcgisonline as dynamic and re-projecting it on the fly is much faster than having to re-project all my data on the fly.

Plus, if I do it this way, all the coordinates listed are relative to the ESRI basemap projection, not your local data.

R_
0 Kudos