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.

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 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!