Happy new year GH team and community !
Is there a way to display edge distance in the local MVT display?
I am also trying to display an additional custom encoded value called speedclass . I have specified this encoded value in the list in tileLayers.js and am also trying to add edge distance here as well as can be seen below.
Regarding the distance, yes, you should be able to specify details=distance
- this will use the DistanceDetails.
Hi @karussell
When I specify details=distance
, it does not appear.
It won’t appear automatically. You need to change the javascript source like you did for routing_priority, I think.
I am not sure I know which javascript source you are referring to.
Ah, no. It seems I already implemented this and it picks up all details
.on('click', function(e) {
})
.on('mouseover', function(e) {
console.log(e.layer.properties);
// remove route info
$("#info").children("div").remove();
// remove last vector tile info
$("#info").children("ul").remove();
var list = "";
$.each(e.layer.properties, function (key, value) {
list += "<li>" + key + ": " + value + "</li>";
});
$("#info").append("<ul>"+list+"</ul>");
$("#info").show();
}).on('mouseout', function (e) {
// $("#info").html("");
});
overlays = { "Local MVT": vtLayer };
}
Strange, that this does not seem to work. Did you recompile the JS bundle or e.g. ran mvn clean install
?
I also noticed that the details are picked it up in the main.js
yes.
I did recompile using mvn -DskipTests clean install
yes. Is there perhaps a limit on the amount of details there can be displayed in the local MVT?
system
Closed
April 11, 2022, 6:12am
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.