cdallapiazza

How to create hybrid basemap aerial + road overlay

Discussion created by cdallapiazza on Sep 9, 2013
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!

Outcomes