The Javascript API allows applications to embed an application built on the GIS framework directly into their application and to interact with it to perform various tasks. To use the framework the following scripts must be loaded on the page:
These scripts can be referenced directly from the GISFramework website with the following URLs:
You can also reference the all in one package:
If your site already uses jQuery, load the map scripts in "
no conflict mode" using the following url:
The Javascript API has the following functions available:
Name | Description |
---|
FDOT.Map.create | The create method creates the map object on the page and configures it for use. The onReady callback is executed once the map has completed its initialization. |
FDOT.Map.destroy | The destroy method removes a configured map from the page. |
FDOT.Map.executeCommand | Executes a framework command using the specified parameters and the id for a callback to invoke on command completion. |
FDOT.Map.executeComponent | Executes a named component. This is intended for use in embedded mode where a component is needed without having to show the component toolbar. |
FDOT.Map.selectPoint | The selectPoint method enables geometry selection mode for the map. Once the user clicks a point on the map, the callback function will be executed, passing in the selected geometry. |
FDOT.Map.selectPolyline | The selectPoint method enables geometry selection mode for the map. Once the user clicks a point on the map, the callback function will be executed, passing in the selected geometry. |
FDOT.Map.selectBox | The selectBox method enables geometry selection mode for the map. Once the user completes their selection on the map, the callback function will be executed, passing in the selected geometry. |
FDOT.Map.selectCircle | The selectCircle method enables geometry selection mode for the map. Once the user completes their selection on the map, the callback function will be executed, passing in the selected geometry. |
FDOT.Map.selectPolygon | The selectPolygon method enables geometry selection mode for the map. Once the user completes their selection on the map, the callback function will be executed, passing in the selected geometry. |
FDOT.Map.cancelGeometrySelection | The cancelGeometrySelection method ends geometry selection mode for the map if a geometry selection was in progress. |
FDOT.Map.setProperty | Sets a named property in Silverlight's isolated storage using the framework's client-side caching support. This can be used for storing application-specific information or modifying framework settings. For example, setProperty('DoPersistCache', 'true') enables client-side caching of query results. |
FDOT.Map.getProperty | Returns the named property from Silverlight's isolated storage using the framework's client-side caching support. |
FDOT.Map.addExtentChangeHandler | Adds handler when the extent changes on the map. |
FDOT.Map.addFeatureSelectionChangeHandler | Adds handler when the feature on the map is selected. |
FDOT.Map.addVisibleLayersChangeHandler | Adds handler when the visible layers are changed. |
FDOT.Map.getQueryableLayers | Gets the list of queryable layers for the map. |
FDOT.Map.getVisibleLayers | Gets the list of visible layers for the map. |
See Also Existing ScriptableCommandsSee Also