KML createPlacemark should use attributes.name
This commit is contained in:
@@ -1210,8 +1210,8 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
createPlacemarkXML: function(feature) {
|
||||
// Placemark name
|
||||
var placemarkName = this.createElementNS(this.kmlns, "name");
|
||||
var name = feature.style && feature.style.label ? feature.style.label :
|
||||
feature.attributes.name || feature.id;
|
||||
var label = (feature.style && feature.style.label) ? feature.style.label : feature.id;
|
||||
var name = feature.attributes.name || label;
|
||||
placemarkName.appendChild(this.createTextNode(name));
|
||||
|
||||
// Placemark description
|
||||
|
||||
Reference in New Issue
Block a user