One of my clients wants to build a web application with the PTV Vector Maps.
How can he display specific icons at geo-coordinates he just geocoded?
Thanks and regards,
Marko
PTV Developer Vector Maps and Icons...
-
- Posts: 6
- Joined: Mon Jan 11, 2021 11:47 am
PTV Developer Vector Maps and Icons...
Marko Cancar
Account Executive
PTV Logistics - Austria
Account Executive
PTV Logistics - Austria
- Bernd Welter
- Site Admin
- Posts: 2780
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: PTV Developer Vector Maps and Icons...
Hi Marko,
the answer to your question depends on the chosen mapping framework.
In the Developer tutorials we use the MapLibre library (a community driven fork of MapBox GL)
I just checked the Tutorials: position matching looks promising.
the answer to your question depends on the chosen mapping framework.
In the Developer tutorials we use the MapLibre library (a community driven fork of MapBox GL)
I just checked the Tutorials: position matching looks promising.
Code: Select all
function addMarker(lngLat, textAsHtml) {
const popup = new maplibregl.Popup({closeButton: false})
.setHTML(textAsHtml);
const marker = new maplibregl.Marker()
.setLngLat(lngLat)
.setPopup(popup)
.addTo(map);
mapMarker = marker;
marker.togglePopup();
}
function clearMarker() {
if (mapMarker) mapMarker.remove();
mapMarker = undefined;
}
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
