Topic: Setting markers on Vector maps
myronblake86 free asked 3 years ago
Hi! I use mdb vector maps and trying to set markers. How to convert latitude and longitude into x, y ?
Marcin Luczak staff answered 3 years ago
Hi,
VectorMap works with canvas coordinates relative to the map's SVG element. As you could use a variety of maps it is not possible to use latitude and longitude coordinates and use them inside the VectorMap. You should use x and y coordinates instead.
For creating bullets/markers for jquery VectorMaps please see Events documentation
Keep coding, Marcin
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: MDB4 4.19.2
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No
myronblake86 free commented 3 years ago
1 latlng works only with $('#map').vectorMap({.... using jQuery
2 But only x y works with new VectorMap (JS as in examples not jQuery) const map = document.getElementById('map-with-bullets'); const mapInstance = new VectorMap(map, {
I want to use VectorMap function with latlng, but how?