hi !
i have the following code
portname["2000"] = ["Büsum"];
portname["2001"] = ["Cuxhaven"];
portname["2002"] = ["Dagebüll"];
portname["2003"] = ["Schleswig"];
portname["2004"] = ["Flensburg"];
portname["2005"] = ["Boltenhagen"];
coord["2000"] = [54.120602,8.860474];
coord["2001"] = [53.867105,8.708038];
coord["2002"] = [54.729378,8.695679];
coord["2003"] = [54.504340,9.559479];
coord["2004"] = [54.788809,9.440002];
coord["2005"] = [53.987588,11.196442];
var portStyle = {
strokeColor: "#FFFFFF",
strokeOpacity: 1,
strokeWidth: 3,
fillColor: "#FF5500",
fillOpacity: 0.5,
pointRadius: 6,
pointerEvents: "visiblePainted",
label : "${name}",
fontColor: "${favColor}",
fontSize: "15px",
fontFamily: "Arial",
fontWeight: "normal",
labelAlign: "${align}",
labelXOffset: "${xOffset}",
labelYOffset: "${yOffset}"
};
vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry"); //
end-vectorLayer
map.addLayer (vectorLayer);
var littleports = new Array();
littleports = ["2000","2001","2002","2003","2004","2005"];
for (j in littleports){
var point = new
OpenLayers.Geometry.Point(coord[littleports[j]][1],coord[littleports[j]][0]).transform(map.displayProjection,
map.getProjectionObject());
var data = {name: portname[littleports[j]]};
var pointFeature = new OpenLayers.Feature.Vector(point, data,
portStyle);
vectorLayer.addFeatures(pointFeature);
} // end-for
but the problem is that the label in the browser is ${name} !!!
can anybody tell me the mistake and how to show the right names in the
map like Büsum, Boltenhagen etc. ??
regards Jan :-)
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users