The API_Plugin groups all the functions to initialize the different components of the map. All the components are initialized once they have been created.
IGN API_Plugin | The API_Plugin groups all the functions to initialize the different components of the map. |
Functions | |
InitVectorLayer | Function initializing the vector layer, preparing the loading of vector layers. |
InitControlPanel | Function initializing the control panel, preparing the tool box and the listeners for the different functionalities such as measuring, cleaning or centering the map. |
InitServiceLayers | Function initializing the service layer, preparing the map for the loading of WMS or wMTS layer. |
InitMapLayers | Function initializing the map layer, preparing the layer tree, which is exactly the same as the openlayer layer array Listeners have to be defined to apply the changes that can be done on the openlayer array at the layer tree, so as to keep the structure |
docAddVector | Add new vectorial layers. |
docAddVectorCluster | Add the input vector layer to the map, draw its features and add the layer into the TOC. |
InitSearch | Function initializing the search module |
InitApiCore | Function called after creating the Map to initialize its components |
ComprobarCondicionesAtribuciones | Function that verify 2 conditions, zoom level and visible layer. |
ComprobarAtribuciones | Function called to replace the attribution name depending on the area where the center of the image is. |
isMobile | Specifies if the API is displayed in a mobile device |
InitMapLayers : function( elementSetVector )
Function initializing the map layer, preparing the layer tree, which is exactly the same as the openlayer layer array Listeners have to be defined to apply the changes that can be done on the openlayer array at the layer tree, so as to keep the structure
docAddVector : function( projType, vectorIGN, vectorType, this_API_CORE, zoomLevel )
Add new vectorial layers. This is an asyncronous operation, the result is sent when the completeVectorial event is triggered. The user can define the callback function in the IGN_API_CORE widget creation.
var apiMap = $('#map').IGN_API_CORE({ completeVectorial:function(event,result){ if (result.input.length>0) alert(result.result + " " + result.input[0] + " " + result.input[1] + " " + result.input[2]); else alert(result.result);}, divIdMap: 'map', SRS:'4258', defaultZoom: true, defaultExtension: true, defaultZoomBox: true, defaultSearching: true, defaultTools:true });
returnValue: _ResultNewVector structure:
docAddVectorCluster : function( projType, vectorIGN, vectorType, this_API_CORE, distance, showFeatures, zoomLevel )
Add the input vector layer to the map, draw its features and add the layer into the TOC.
var apiMap = $('#map').IGN_API_CORE({ completeVectorial:function(event,result){ if (result.input.length>0) alert(result.result + " " + result.input[0] + " " + result.input[1] + " " + result.input[2]); else alert(result.result);}, divIdMap: 'map', SRS:'4258', defaultZoom: true, defaultExtension: true, defaultZoomBox: true, defaultSearching: true, defaultTools:true });
returnValue: _ResultNewVector structure:
Function initializing the vector layer, preparing the loading of vector layers.
InitVectorLayer: function( elementSetVector )
Function initializing the control panel, preparing the tool box and the listeners for the different functionalities such as measuring, cleaning or centering the map.
InitControlPanel : function( elementSetVector )
Function initializing the service layer, preparing the map for the loading of WMS or wMTS layer.
InitServiceLayers: function( elementSetVector )
Function initializing the map layer, preparing the layer tree, which is exactly the same as the openlayer layer array Listeners have to be defined to apply the changes that can be done on the openlayer array at the layer tree, so as to keep the structure
InitMapLayers : function( elementSetVector )
Add new vectorial layers.
docAddVector : function( projType, vectorIGN, vectorType, this_API_CORE, zoomLevel )
Add the input vector layer to the map, draw its features and add the layer into the TOC.
docAddVectorCluster : function( projType, vectorIGN, vectorType, this_API_CORE, distance, showFeatures, zoomLevel )
Function initializing the search module
InitSearch : function( objMap )
Function called after creating the Map to initialize its components
InitApiCore : function()
Function that verify 2 conditions, zoom level and visible layer.
ComprobarCondicionesAtribuciones: function()
Function called to replace the attribution name depending on the area where the center of the image is.
ComprobarAtribuciones: function( extensionMapa, fileKML )
Specifies if the API is displayed in a mobile device
isMobile:function()