-
addAnnotation(annotation)
-
Adds an annotation objet to the map.
Parameters:
Name |
Type |
Description |
annotation |
Annotation
|
Annotation objet to add. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addAnnotation(annotation);
-
-
Add a drawing tool to the toolbar.
Parameters:
Name |
Type |
Argument |
Description |
tool |
string
|
|
The type of the tool we want to add. It can be either a "point", a "line" or a "polygon". |
vl |
integer
|
<optional>
|
Specifies the vector layer'ID. 0 by default. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addToolBarLite();
carte.addDrawing2ToolBar("point");
-
addItinerary(iti, options)
-
Add an Itinerary to the map.
Parameters:
Name |
Type |
Description |
iti |
Intinerary
|
Add an Itinerary to the map. |
options |
JSON
|
Describes the options of the Itinerary. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
var iti = new WIND.Map.Itinerary(new Array(new OpenLayers.Geometry.Point(2,45), new OpenLayers.Geometry.Point(3,46)));
carte.addItinerary(iti, {'mode':"route"});
-
addLayer(layerName, isBaseLayer)
-
Add a layer to the map.
Parameters:
Name |
Type |
Argument |
Description |
layerName |
string
|
|
Name of the layer to add. |
isBaseLayer |
boolean
|
<optional>
|
Indicates whether the layer should be the default. Default value is false. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addLayer("Google Terrain");
-
addLayers(an)
-
Add multiple layers to the map.
Parameters:
Name |
Type |
Description |
an |
string[]
|
array of layer names we want to add. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addLayers(["Google Satellite","Google Hybrid","Google Terrain","OpenStreetMap","Yahoo Street","Yahoo Satellite","Yahoo Hybrid","Bing Road","Bing Hybrid","Bing Aerial","IGN Satellite","IGN Route"]);
-
addMarker(marker, vl)
-
Add a marker to the map.
Parameters:
Name |
Type |
Argument |
Description |
marker |
Map.Marker
|
|
The marker to add to the map. |
vl |
integer
|
<optional>
|
Specifies the vector layer'ID. 0 by default. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
var marqueur = new WIND.Map.Marker(-1.509136,43.478266);
carte.addMarker(marqueur);
-
addScaleControl()
-
Adds a tool to resize the map.
Example
carte.addScaleControl();
-
addSensiblePart(mp, display, vl)
-
Add a Map.Part object to the default layer vector.
Parameters:
Name |
Type |
Description |
mp |
Map.Part
|
the Map.Part object to add to the map. |
display |
boolean
|
Indicates whether Map.Part appears or not. |
vl |
integer
|
Specifies the vector layer'ID. 0by default. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addSensiblePart(mp, true);
-
-
Add a toolbar of drawing tools.
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addToolBarLite();
-
addVectorLayer(vl)
-
Add a new vector layer
Parameters:
Name |
Type |
Description |
vl |
integer
|
The new vector layer ID we want to add. By default a vector layer with an ID 0 is added to the Map object. |
Example
var carte = new WIND.Map("mymap", {});
carte.addVectorLayer(1);
-
changeBaseLayer(newBaselayerName)
-
Change the base layer of the map.
Parameters:
Name |
Type |
Description |
newBaselayerName |
string
|
Name of the new base layer. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addLayer("Google Terrain");
carte.addLayer("IGN Street");
carte.changeBaseLayer("IGN Street");
-
createAnnotation(type, entity, geodata, options, vl) → {Annotation}
-
Creates ana Annotaion objet on the map.
Parameters:
Name |
Type |
Argument |
Default |
Description |
type |
string
|
|
|
Represents the type of the Annotation objet to add. Its value can be anything. |
entity |
string
|
|
|
Name of the annotated entity. |
geodata |
string
|
|
|
Type and coordinates of the figure. It can either a "POLYGON", a "MULTIPOLYGON", a "LINEstring", a "MULTILINEstring", a "POINT", a "MULTIPOINT", a "MARKER" or a "MULTIMARKER. |
options |
JSON
|
<optional>
|
|
Options for the Annotation object. It may contain up to four parameters: -projection, the projection we want to use, -style, the style of the annotation and may contain 5 options: strokeColor, strokeWidth, strokeOpacity, fillColor and fillOpacity, -display, either we diplay the annotation or not and -geoname, the name of the geometry. |
vl |
integer
|
<optional>
|
0
|
The Id of the vector layer we want to add the annotation to it. |
Returns:
returns Annotation object.
-
Type
-
Annotation
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.createAnnotation("ville", "Mauléon-Licharre", "POINT(0.567893 45.64124)",{"projection":"EPSG:4326","style":"strokeColor:#0033CC,strokeWidth:3,strokeOpacity:1,fillColor:#FF9900,fillOpacity:1","display":true,"geoname":"point"},0);
-
destroy()
-
Destroys the map and remove it from the page.
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.destroy();
-
getValue() → {JSON}
-
Returns the properties of the Map object in the JSON format.
Returns:
string in the JSON format containing the properties.
-
Type
-
JSON
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
var valeur = carte.getValue();
-
initialize()
-
Initialize the map.
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.initialize();
-
removeLayer(layerName)
-
Remove the layer from the map.
Parameters:
Name |
Type |
Description |
layerName |
string
|
Name of the layer to remove. |
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addLayer("IGN Street");
carte.removeLayer("Google Satellite");
-
-
Remove the toolbar from the map.
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.addToolBarLite();
carte.addDrawing2ToolBar("line");
carte.removeToolBar();
-
SelectVectorLayer(vl, auto)
-
Select the active vector layer
Parameters:
Name |
Type |
Argument |
Default |
Description |
vl |
integer
|
Array.<integer>
|
|
|
The vector layers we want to add. If we want to select only one vector layer it's an integer, and if we want to select multiple vector layers it is an array of integer. |
auto |
boolean
|
<optional>
|
false
|
If true allows to adjust the opacity and border of the all annotations in all the vector layers. If the annotation is in an active vector layer, it will be with a border and will have an important opacity. And if it's in an inactive vector layer, it will be without border and will have 0.3 opacity. By default this parameter is set to false. |
Example
var carte = new WIND.Map("mymap", {});
carte.addVectorLayer(1);
carte.SelectVectorLayer(1,true);
-
zoomIn()
-
Zoom in on the map.
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.zoomIn();
-
zoomOut()
-
Zoom out the map.
Example
var carte = new WIND.Map("mymap", {'top': 10, 'left': 20, 'width': 600, 'height': 400, 'name': "carte", 'type': 'Google Street', 'longitude': -0.9331, 'latitude': 45.9236, 'zoom': 5, 'draggable': false, 'resizable' : false,'color': '#FF9900', 'border': '#FF9900 2px solid', 'header': false, 'removable': false, 'configurable': false,'zoomable':true});
carte.zoomOut();