NetTalk Central

Author Topic: NetMaps how to show a number over the icon.  (Read 1960 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NetMaps how to show a number over the icon.
« on: February 25, 2021, 06:23:37 AM »
Hi Bruce, I need to show a number over each Icon.
Ive tried with

            x# = ((ppqc:Longitud - net.LongitudeX) / net.LongitudePerPixel)
            y# = ((net.LatitudeY - ppqc:Latitud) / net.LatitudePerPixel)
            b" = '1'
            !MESSAGE(net.LatitudeY&' '&net.LongitudeX&' '&x#&' '&y#&' '&clip(b"))
            net.draw.setPenWidth(3)
            net.draw.setPenColor(COLOR:Black)
            net.draw._ShowFull(x#,y#,clip(b"))   

HOw to do it?
Thanks

« Last Edit: February 25, 2021, 06:36:11 AM by michelis »
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetMaps how to show a number over the icon.
« Reply #1 on: March 22, 2021, 10:47:05 AM »
Now Im using the IconIndex param to set the nuember and showing it using

      Compile('***',_DRAW_=1)
      if pIconIndex>10
          !MESSAGE('dibuja nr '&pIconIndex)
          self.draw.Show(px+10,py+20,clip(pIconIndex-10))
      END
      *** 

after the _DrawIcon parent call.

It works but it this safe?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: NetMaps how to show a number over the icon.
« Reply #2 on: March 22, 2021, 11:35:58 PM »
safe in what way? thread-safe?

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetMaps how to show a number over the icon.
« Reply #3 on: March 23, 2021, 03:24:46 AM »
Safe in the way that pIconIndex is suppoused to be the icon number in the icon file... but its working ok this way.
-----------
Regards
Alberto