NetTalk Central

Author Topic: Custom icon for markers on NT Maps?  (Read 3535 times)

Poul Jensen

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • Email
Custom icon for markers on NT Maps?
« on: April 07, 2025, 03:09:43 AM »
Hi,

NT Maps have marker icons that are located in /web/images and have filenames like marker-icon-aqua.png, marker-icon-blue.png etc.
The markers are defined in d:\Clarion11\accessory\libsrc\win\NetWeb\web\scripts\jquery.nt-maps.js

I would like to add my own icons like the ones with letters shown on attached screenshot from my desktop map.

Since I only use 4 colours I *could* modify the unused icons in the shipping set, but I would rather add my own custom icons.
Is it possible to add additional js code somewhere, without modifying the shipping jquery.nt-maps.js.  Something like this:

Code: [Select]
var myYellowVMarker = L.icon({
    iconUrl: '/images/marker-icon-yellowV.png',
    iconRetinaUrl: '/images/marker-icon-yellowV-2x.png',
    shadowUrl: '/images/marker-shadow.png',
    iconSize: [25, 41],
    iconAnchor: [12, 41],
    popupAnchor: [1, -34],
    shadowSize: [41, 41]
});

Cheers
/Poul

Alberto

  • Hero Member
  • *****
  • Posts: 1884
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Custom icon for markers on NT Maps?
« Reply #1 on: April 07, 2025, 10:03:50 AM »
Hi when setting a marker you can indicate the icon you want:

net.SetMarker(net.WaypointsQueue.ID,format(ppqc:Latitud,@n-11.7),format(ppqc:Longitud,@n-11.7),loc:IconoRuta,10+parada#,,,true)
-----------
Regards
Alberto

Poul Jensen

  • Full Member
  • ***
  • Posts: 241
    • View Profile
    • Email
Re: Custom icon for markers on NT Maps?
« Reply #2 on: April 07, 2025, 10:15:31 AM »
Thanks Alberto,

But isn't this the code for the map on desktop?

I need the equivalent for NT web.

Cheers
/Poul