1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| var GeoNames= new Geoportal.Control.LocationUtilityService.GeoNames(
new Geoportal.Layer.OpenLS.Core.LocationUtilityService("PositionOfInterest:OPENLS;Geocode", {
maximumResponses:100,
formatOptions: {},
styleMap:new OpenLayers.StyleMap({
"default": new OpenLayers.Style(
OpenLayers.Util.applyDefaults({
externalGraphic:"assets/marker.png",
graphicOpacity:1.0,
pointRadius:24,
label:"Accident",
labelAlign: "b",
labelXOffset: -26,
labelYOffset: -35,
fontWeight: "bold",
fontSize: "16px"
},OpenLayers.Feature.Vector.style["default"])),
"select": new OpenLayers.Style(
OpenLayers.Util.applyDefaults({
externalGraphic:"assets/marker.png",
graphicOpacity:1.0,
pointRadius:24
},OpenLayers.Feature.Vector.style["select"])),
"temporary": new OpenLayers.Style(
OpenLayers.Util.applyDefaults({
externalGraphic:"assets/marker.png",
graphicOpacity:1.0,
pointRadius:24
},OpenLayers.Feature.Vector.style["temporary"]))
})
}),{
drawLocation:true,
setZoom: function() {return 16}, // Réglage du niveau de zoom
autoCompleteOptions: {},
placesOptions: {
commune:true,
territory:false,
importance:false,
departement:true
}
}
);
panel.addControls([GeoNames]); |
Partager