Recent

Author Topic: LazMapViewer - use for Tracking  (Read 7402 times)

wp

  • Hero Member
  • *****
  • Posts: 9033
Re: LazMapViewer - use for Tracking
« Reply #15 on: September 30, 2021, 12:00:56 am »
The new revision of the MapViewer supports an ImageList, POIImages, with images which can be displayed for individual points of interest.

For this purpose a special class of GPS points, TGPSPointOfInterest, must be added to the mapviewer's GPSItems; this class has an imageindex which refers to the POIImages.

The FullDemo was extended to demonstrate this feature: On page "Config" activate the "POI mode" "image from imagelist", right-click into the map at the point where an image is supposed to appear, enter the caption of the POI and select the image from the combobox.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

wp

  • Hero Member
  • *****
  • Posts: 9033
Re: LazMapViewer - use for Tracking
« Reply #16 on: September 30, 2021, 06:58:46 pm »
In essence this all boils down to the the fact that there must be various images in an 'image list' ? and these images must be 'mouse accessible'.
Handle the MouseDown or MouseUp event of the MapView, and here call the new method MapView.ObjsFromScreenPt(X, Y, delta) which returns an array of GPSPoints which are found inside the box around X,Y (+/- delta, where delta is optional, default is 3).

Note that the images used by the MapView are drawn such that the point of reference is at the center of the bottom image border.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

MarkMLl

  • Hero Member
  • *****
  • Posts: 3533
Re: LazMapViewer - use for Tracking
« Reply #17 on: September 30, 2021, 07:19:50 pm »
Pardon me for jumping in but just a wild question based on some stuff I'm tinkering with: is it limited to a single GNSS feed, or can it handle multiple ones simultaneously?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

wp

  • Hero Member
  • *****
  • Posts: 9033
Re: LazMapViewer - use for Tracking
« Reply #18 on: September 30, 2021, 07:38:38 pm »
No, it has nothing to do with satellite navigation. LazMapViewer only loads maps such as OpenStreetMaps, GoogleMaps etc from their servers where they are stored as png images and displays them in your form. Addons are marking user-provided specific points or tracks, the latter ones can be extracted from gpx files.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

MarkMLl

  • Hero Member
  • *****
  • Posts: 3533
Re: LazMapViewer - use for Tracking
« Reply #19 on: September 30, 2021, 08:19:04 pm »
Thanks, I'll investigate.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

loaded

  • Sr. Member
  • ****
  • Posts: 376
Re: LazMapViewer - use for Tracking
« Reply #20 on: October 01, 2021, 02:52:10 pm »
While we're on the subject;
I installed and tried LazMapViewer a long time ago, it was working but it was very slow. Now the speed point is noticeably improved.
But there still seems to be a color clutter problem in screen movements.
Does Lazmapviewer come with multi-layer and transparency features on the subject? If it comes when? Can I learn. If the situation is unclear;
Soon I'll be on the road to roll up my sleeves and write a Tile Viewer from scratch.
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

wp

  • Hero Member
  • *****
  • Posts: 9033
Re: LazMapViewer - use for Tracking
« Reply #21 on: October 01, 2021, 03:26:59 pm »
Soon I'll be on the road to roll up my sleeves and write a Tile Viewer from scratch.
Then go ahead. Looking forward to your contribution. I still consider LazMapViewer as highly experimental, even when it's in OPM, and I am willing to accept also code-breaking changes. But before aiming at using the super-fanciest graphics library which is sooooo fast: you can do so, but you should provide also a solution which runs with the standard classes coming with Lazarus and fpc at sufficient speed.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

loaded

  • Sr. Member
  • ****
  • Posts: 376
Re: LazMapViewer - use for Tracking
« Reply #22 on: October 01, 2021, 05:26:37 pm »
Master wp,
There is a saying in Turkish, "I Can't Pour Water On Your Hands". The English equivalent, I suppose, is "Can't hold a candle to", so at the knowledge point you're a master and I'm an apprentice. I'm sorry if I unwittingly made you angry with the wrong expression.
Respects.
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

wp

  • Hero Member
  • *****
  • Posts: 9033
Re: LazMapViewer - use for Tracking
« Reply #23 on: October 01, 2021, 05:46:28 pm »
I'm sorry if I unwittingly made you angry with the wrong expression.
Oh no, you did not make me angy. With what? I am really looking forward to your contribution.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

loaded

  • Sr. Member
  • ****
  • Posts: 376
Re: LazMapViewer - use for Tracking
« Reply #24 on: October 01, 2021, 06:34:11 pm »
But before aiming at using the super-fanciest graphics library which is sooooo fast
I'm so glad you weren't angry.  ;D
Actually, I have been studying the leaflet    https://leafletjs.com/   used on the Web for a long time, whenever I can, and I have more or less grasped the logic of tiling. I tried to use thread in speed point but I couldn't figure out fast start and end like in browser in Chrome.
I hope that when the knowledge I have acquired reaches a certain level, I will contribute as much as I can
If Ide=Lazarus 2.0.10 32 Bit and Os=Win 10 Home 64 Bit then Get up and do something useful! Because God is the helper of those who start again;

wp

  • Hero Member
  • *****
  • Posts: 9033
Re: LazMapViewer - use for Tracking
« Reply #25 on: October 01, 2021, 06:54:53 pm »
I was not aware of this leaflet. It is amazing!
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018