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 rwbodyStyle = new OpenLayers.StyleMap
(
{
"default": new OpenLayers.Style
(
{
strokeColor:'#0000ff',
strokeWidth:3
}
),
"select": new OpenLayers.Style
(
{
strokeColor:'#3399ff',
strokeWidth:3
}
)
}
) ;
maCarte.getMap().addLayer(
"WFS",
"Tronçon de route",
"http://rks0911w267:8081/geoserver/bduni/wfs",
{
typename:'bduni:troncon_de_route',
maxFeatures:200
},
{
featureClass:OpenLayers.Feature.WFS,
projection:'EPSG:4326',
units:'degrees',
isBaseLayer:false,
minZoomLevel:14,
maxZoomLevel:20,
visibility:true,
maxExtent:bounds, //défini plus haut dans le code.
extractAttributes:true,
styleMap:rwbodyStyle,
hover:true
}
) ; |
Partager