Skip to content
Snippets Groups Projects
Commit d962f563 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fix double markers on route waypoints

parent 8f22dbc2
Branches
No related tags found
1 merge request!18Resolve "Switch to Graphhopper"
{
"/js/modules.js": "/js/modules.js?id=6e01750e4a5262f0aa6b58c1102448f2",
"/resources/css/offline-module.css": "/resources/css/offline-module.css?id=9de68a717293298cc813e57caf5dc970",
"/js/lib.js": "/js/lib.js?id=5e13e04914a8734ddea7a01a64d8a3ba",
"/js/map.js": "/js/map.js?id=02031119bc65d3e8328f934b2d9f9a12",
"/js/turf.min.js": "/js/turf.min.js?id=859561c2951cc6bd635ac2b0e8813256",
"/css/staticPages.css": "/css/staticPages.css?id=74737c858d58797108ca9ac733c7fa59",
"/css/general.css": "/css/general.css?id=787dbb34eea9bbfaa241777238c92e72",
"/css/mapSearch.css": "/css/mapSearch.css?id=ae0023b9d1214e22f2f22774282a213c",
"/css/iframeSearch.css": "/css/iframeSearch.css?id=acc6e5e3c58d12f4b6516fc1790bf2e5",
"/css/routing.css": "/css/routing.css?id=014b091b4366ad8570c8aa53c8b05d8a"
}
...@@ -23,7 +23,7 @@ Waypoint.prototype.evaluate = function() { ...@@ -23,7 +23,7 @@ Waypoint.prototype.evaluate = function() {
el.className = "marker"; el.className = "marker";
el.setAttribute("data-resultNumber", waypoint.index); el.setAttribute("data-resultNumber", waypoint.index);
el.innerHTML = waypoint.charCode; el.innerHTML = waypoint.charCode;
waypoint.marker = new maplibregl.Marker(el).setLngLat([ waypoint.marker = new maplibregl.Marker({element: el}).setLngLat([
waypoint.lon, waypoint.lon,
waypoint.lat, waypoint.lat,
]); ]);
...@@ -46,7 +46,7 @@ Waypoint.prototype.evaluate = function() { ...@@ -46,7 +46,7 @@ Waypoint.prototype.evaluate = function() {
el.className = "marker"; el.className = "marker";
el.setAttribute("data-resultNumber", waypoint.index); el.setAttribute("data-resultNumber", waypoint.index);
el.innerHTML = waypoint.charCode; el.innerHTML = waypoint.charCode;
waypoint.marker = new maplibregl.Marker(el).setLngLat([ waypoint.marker = new maplibregl.Marker({element: el}).setLngLat([
waypoint.lon, waypoint.lon,
waypoint.lat, waypoint.lat,
]); ]);
...@@ -61,7 +61,7 @@ Waypoint.prototype.evaluate = function() { ...@@ -61,7 +61,7 @@ Waypoint.prototype.evaluate = function() {
el.className = "marker"; el.className = "marker";
el.setAttribute("data-resultNumber", waypoint.index); el.setAttribute("data-resultNumber", waypoint.index);
el.innerHTML = waypoint.charCode; el.innerHTML = waypoint.charCode;
waypoint.marker = new maplibregl.Marker(el).setLngLat([ waypoint.marker = new maplibregl.Marker({element: el}).setLngLat([
waypoint.lon, waypoint.lon,
waypoint.lat, waypoint.lat,
]); ]);
...@@ -107,7 +107,7 @@ Waypoint.prototype.changeIndex = function(newIndex) { ...@@ -107,7 +107,7 @@ Waypoint.prototype.changeIndex = function(newIndex) {
el.className = "marker"; el.className = "marker";
el.setAttribute("data-resultNumber", this.index); el.setAttribute("data-resultNumber", this.index);
el.innerHTML = this.charCode; el.innerHTML = this.charCode;
this.marker = new maplibregl.Marker(el).setLngLat([this.lon, this.lat]); this.marker = new maplibregl.Marker({element: el}).setLngLat([this.lon, this.lat]);
}; };
Waypoint.prototype.positionToAdress = function(errorCount) { Waypoint.prototype.positionToAdress = function(errorCount) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment