How to create hybrid basemap aerial + road overlay

2775
1
09-09-2013 11:10 AM
ChrisDalla_Piazza
New Contributor III
I am unclear on exactly how to create a hybrid basemap in AGOL.  I checked out the local government sample which appears to implement the map as an aerial basemap with an operational road overlay.  http://www.arcgis.com/home/item.html?id=9c8b3044c4054d59b658184c3737c432

I've also created a group that has all my basemaps.  This works great in the Javascript API basic viewer template when I supply the group id to the basemapGallery.

Except the hybrid map I created in AGOL does not display the roads overlay.  It does display the overlay when you view it in the ArcGIS.com map viewer.

I am able to successfully create the hybrid manually using code as follows:

    basemapGallery.add(new esri.dijit.Basemap({
        layers: [
            new esri.dijit.BasemapLayer({
                "url": "http://myserver/ArcGIS/rest/services/Roads/MapServer"
            }),
            new esri.dijit.BasemapLayer({
                "url": "http://myserver/ArcGIS/rest/services/AerialPhoto/2012/MapServer"
            })
        ],
        title: "2012 Hybrid Aerial Photo",
        thumbnailUrl: "http://myserver/mythumb.jpg"
    }));


I inspected the JSON coming out of AGOL and I think the problem is that the overlay is being marked as an operational layer rather than a second base layer.

Is there anyway to add more than one base layer to an AGOL map?

Is there a different way that I am supposed to implement the hybrid basemap?

I'd rather not burn the roads overlay into a second cached map service separate from the aerial photo cached map service.

Thanks for any suggestions!
Tags (2)
0 Kudos
1 Reply
AnnyaCamykal
New Contributor II

Trying to do the same and is unsuccessful I can add to the base layer in Map Viewer but it's not the same it automatically make one default so it's one or the other. Really annoyed that we can't do this all I'm trying to do is an some updated imagery layer that we have below some roads and its turning out to be a pain.

0 Kudos