[OpenLayers-Users] vector labels using kml
Thqr
s.underwood at fugro.com.au
Wed Jun 9 23:09:33 EDT 2010
I am using the label : "${name}" exactly how you specified and still can
not get the name from the KML to apply to a label on any of my placemarks
from my KML feed. Tried you style exactly did not work this is what I was
trying with:
\\-
var styleMap = new OpenLayers.StyleMap({
fillOpacity: 1,
pointRadius: 10,
label: "${name}",
fontColor: "#7E3C1C",
fontSize: "13px",
fontFamily: "Courier New, monospace",
fontWeight: "strong",
labelXOffset: "0",
labelYOffset: "-15"
});
\\-
and the layer:
\\-
var mykmllayer= new OpenLayers.Layer.Vector("KML Layer",
{
styleMap: styleMap,
projection: new OpenLayers.Projection("EPSG:4326"),
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: URLTOKML,
format: new OpenLayers.Format.KML({
styleMap: myStyles,
extractStyles: true,
extractAttributes: true
})
})
});
\\-
Do not get a single label?
Any reason why this wouldn't work?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/vector-labels-using-kml-tp4802937p5161433.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list