this.dataLayer = new L.OSM.DataLayer(null);
this.dataLayer.options.code = 'D';
+
+ this.gpsLayer = new L.OSM.GPS({
+ pane: "overlayPane",
+ code: "G",
+ name: I18n.t("javascripts.map.base.gps")
+ });
},
updateLayers: function(layerParam) {
clickable: false
};
- this._object = object;
-
- if (this._objectLoader) this._objectLoader.abort();
- if (this._objectLayer) this.removeLayer(this._objectLayer);
+ this.removeObject();
var map = this;
this._objectLoader = $.ajax({
url: OSM.apiUrl(object),
dataType: "xml",
success: function (xml) {
+ map._object = object;
+
map._objectLayer = new L.OSM.DataLayer(null, {
styles: {
node: objectStyle,
}
});
-L.Icon.Default.imagePath = "/images";
+L.Icon.Default.imagePath = "/images/";
L.Icon.Default.imageUrls = {
"/images/marker-icon.png": OSM.MARKER_ICON,