Default basemap - Bing ?

914
3
09-08-2011 06:08 AM
MatthewFletcher
Occasional Contributor
I'm using the Mobile Content Directory to overlay one of my map services with the ESRI world topo map service.

{
    "version": "1.1",
    "operationalLayers": [
        {
            "url": "http://my_server/ArcGIS/rest/services/MobileServices/map_service_non_cached/MapServer",
            "visibility": true,
            "opacity": 1,
            "title": "OperationalData"
        }
    ],
    "baseMap": {
        "baseMapLayers": [
            {
                "url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
            }
        ],
        "title": "Basemap"
    }
}


Is there any way to use a Bing imagery or hybrid service as the default basemap?  I can switch to the Bing imagery or hybrid services via the basemap switch button in the iOS Ver 2.01 app, but can't figure out how to load it as the default basemap. 

Any one  ever come across this?
0 Kudos
3 Replies
RussRoberts
Esri Notable Contributor
Try this JSON.



{
  "operationalLayers": [],
  "baseMap": {
    "baseMapLayers": [{
      "id": "BingMapsAerial",
      "opacity": 1,
      "visibility": true,
      "type": "BingMapsAerial"
    }],
    "title": "Bing Maps Aerial"
  },
  "version": "1.3"
}


Also i noticed you are using the 1.1 version of the webmap JSON format. You will also need to define popups for your map and/or feature services being used within the map to be able to identify your features if you are using the ArcGIS for iOS app version +2.0.

This thread  will help you in defining your popups.

Let me know how this works out for you
Cheers
Russ
0 Kudos
MatthewFletcher
Occasional Contributor
Thanks for the help Russ, that got me pointed in the right direction.  I got the Bing Hybrid maps loaded as basemap and the popups working for a layer in my map service.  In case anyone's interested, here's the code I got working

{
    "operationalLayers": [
        {
            "url": "http://myserver/ArcGIS/rest/services/MobileServices/my_map_service/MapServer/0",
            "id": "Facilities",
            "visibility": true,
            "opacity": 1,
            "mode": 1,
            "title": "Facilities",
            "popupInfo": {
                "title": "Facility: {TYPE_}",
                "fieldInfos": [
                    {
                        "fieldName": "OBJECTID",
                        "label": "OBJECTID",
                        "isEditable": false,
                        "tooltip": "",
                        "visible": false,
                        "stringFieldOption": "textbox"
                    },
                    {
                        "fieldName": "REGION",
                        "label": "Region",
                        "isEditable": true,
                        "tooltip": "NAPP, etc.",
                        "visible": true,
                        "stringFieldOption": "textbox"
                    },
                    {
                        "fieldName": "PERMITTEE",
                        "label": "Permittee",
                        "isEditable": true,
                        "tooltip": "",
                        "visible": true,
                        "stringFieldOption": "textbox"
                    }
                ]
            }
        },
        {
            "url": "http://myserver/ArcGIS/rest/services/MobileServices/my_map_service/MapServer",
            "id": "Other Map Data",
            "visibility": true,
            "opacity": 1,
            "title": "Other map Data"
        }
    ],
    "baseMap": {
        "baseMapLayers": [
            {
                "id": "BingMapsHybrid",
                "opacity": 1,
                "visibility": true,
                "type": "BingMapsHybrid"
            }
        ],
        "title": "Bing Maps Hybrid"
    },
    "version": "1.3"
}


If you have a sec, one other question.  In the thread you referenced, I noticed a feature service is used in the PopupSample.txt attachment.  Is it the feature service that enables the polygon layer to be edited?


Thanks,
Matt
0 Kudos
RussRoberts
Esri Notable Contributor
Hey Matt
You'er right.
Map services are only viewable/identifiable while the feature service will allow the user to perform edits on existing features or collect new features.
Russ
0 Kudos