Recent

Author Topic: Division by Zero Error; User WP's TMapViewer component (6832) The latest.  (Read 1624 times)

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Hi all,

I really want to say that Lazarus is simply awesome for it being FREE and definitely Powerful, even though it has some bugs. Lazarus community is great. No amount of donation could equal all the contributions provided or given by all those awesome programmers. :) Thank you.

Last week, I downloaded TMapViewer modified by wp User from sourceforge.net, compiled and installed it with no errors of any kind, because his version of TMapViewer has LonLatToScreen and ScreenToLonLat procedures, which I need. However, when I run the demo that came with the TMapViewer or simply creating a new project, placing TMapViewer and setting its property ACTIVE to true, the demo raises DIVISION by ZERO exception and crashes. I have painstakingly debugged the files and I can't seem to figure out where this is taking place.

https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/lazmapviewer/

Has anyone seeing this and/or solved it?

wp

  • Hero Member
  • *****
  • Posts: 11855
I cannot confirm this. What is you OS/widgetset? What is your Lazarus/fpc version and bitness?

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
I also cannot confirm, works!
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Lazarus 2.0.0 64Bit
FPC 3.0.4

OS is Mageia 6 64Bit
widgetset GTK2

Literally, I downloaded wp modified mapviewer last week. Exception is raised when running the program and Lazarus breaks at CATCH ALL EXCEPTION on LazTracer.pas file.

Should I download 6835 version. It looks like it got changed or modified?
« Last Edit: March 25, 2019, 05:19:22 pm by Awesome Programmer »

wp

  • Hero Member
  • *****
  • Posts: 11855
Try the current version, r6837; there was a bitmap pixel format issue which was not noticed on Windows.

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Hi wp,

Thank you. Your update has fixed the Divide By Zero problem.

However, I don't see Google Map in the list. Plus, every time I click on the map and enter the name of the location to add to the point list, it crashes.

I have KcMapViewer in working condition, but it doesn't have a way to add or delete marker on the map for a given LONGITUDE and LATITUDE and keep it in place even if you move the map around. I easily modify the Kcmapviewer to include markers on the map, but it is going from Longitude and Latitude to X,Y on the screen. It is bit too confusing.

 

TinyPortal © 2005-2018