How to: |
By adding a baseMapInfo object to an Esri chart request, you can specify an array of custom map images to use as the background for your chart. You can also place a basemap control on the chart output that displays thumbnails of all available basemaps and lets you switch between basemaps on the resulting chart output.
baseMapInfo : { drawBasemapControl : cboolean, showArcGISBasemaps : sboolean, customBaseMaps : [ { name : "basemapname", title : "basemaptitle", url : "url_to_basemap", thumbnailUrl : "url_to_thumbnail" } ] }
where:
Specifies whether to draw a basemap control on the chart output. Valid values are:
Specifies whether to show the ArcGIS Online basemaps on the basemap control. Valid values are:
Is a name for the basemap that you can use as the baselayer:basemap property to select this basemap for the chart.
Is a title to display under the thumbnail for this basemap on the basemap control.
Is the URL to the endpoint for the basemap.
Is the URL to the thumbnail for the basemap.
The following request adds a basemap from Delorme and a basemap control to the chart.
GRAPH FILE WF_RETAIL_LITE SUM MIN.CITY_POPULATION MAX.DAYSDELAYED BY COUNTRY_NAME WHERE COUNTRY_NAME NE 'Taiwan' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BUBBLEMAP ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * TYPE=REPORT, CHART-LOOK=com.esri.map, $ TYPE=DATA, COLUMN=COUNTRY_NAME, BUCKET=location, $ TYPE=DATA, COLUMN=MIN.CITY_POPULATION, BUCKET=size, $ TYPE=DATA, COLUMN=MAX.DAYSDELAYED, BUCKET=color, $ *GRAPH_JS bubbleMarker: {maxSize: '10%' }, extensions: { "com.esri.map": { overlayLayers: [ { title: "Population", layerType: "bubble", geometrySourceType: "esri", geometryLocateField: ["Country"], geometryDataField: "name", url: "http://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/ World_Countries_(Generalized)/FeatureServer/0" } ],
baseMapInfo : { drawBasemapControl : true, showArcGISBasemaps : true, customBaseMaps : [ { name:"Delorme", title:"Delorme", url:"http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/ DeLorme_World_Base_Map/MapServer", thumbnailUrl:"http://www.arcgis.com/sharing/rest/content/items/ 6d9fa6d159ae4a1f80b9e296ed300767/info/thumbnail/national_map.jpg" } ] }, baseLayer: { basemap: "Delorme" } } } *END ENDSTYLE END
The output, with the basemap control open, is shown in the following image.
To change the chart background, click a thumbnail on the basemap control.
To close the basemap control, click anywhere in the header.
WebFOCUS | |
Feedback |