The create method created the map object on the page and configures it for use. The onReady callback is executed once the map has completed it's initialization.
Parameters
Name | Type | Required | Description |
---|
id | string | Yes | A unique name for the map instance |
containerSelector | string | Yes | The CSS selector to identify the html element to contain the map |
appId | String | No | The id for the application being embedded. If no value is specified teh default application will be loaded. |
source | String | No | The source for the Framework xap file. |
embedded | Boolean | No | This parameter determines whether to load the framework in embedded or full mode. If no value is provided it defaults to false. |
height | String | No | This parameter sets the height of the map. If no value is provided it defaults to '100%'. If using 100% make sure there is an explicit height set on the container element. |
width | String | No | This parameter sets the width of the map. If no value is provided it defaults to '100%'. |
background | String | No | This background color for the silverlight control. Visible during the initial load. If no value is provided it defaults to 'white'. |
showNavigation | Boolean | No | This parameter toggles whether or not the navigation controls are displayed in an embedded map. Defaults to false. |
showScalebar | Boolean | No | This parameter toggles whether or not the scaling controls are displayed in an embedded map. Defaults to false. |
onReady | Function | No | This function will be called once the initialization of the map is complete. |
Example
FDOT.Map.create({
id: 'map',
containerSelector: '#mapContainer',
embedded: true,
appId: 'gev',
height: '100%',
width: '100%',
background: 'white',
source: 'http://tlbstws3.dot.state.fl.us/GISFramework/ClientBin/FDOT.GIS.Client.xap',
onReady: function() {
console.log('map initialization complete');
}
});
See Also