Forum > Graphics

LazMapViewer - Lines between realpoints

<< < (2/6) > >>

What do I need to remove of the OPM version?

Not absolutely necessary since the IDE always used the version that was installed last. But if you want to do it: Check LazMapViewer in OPM, then click "Uninstall".

In order to install the new ccr version unzip the snapshot to some folder, then, in the IDE, go to "Package" > "Open package file (.lpk)" > navigate to the folder with the ccr version > open "lazmapviewerpkg.lpk" > "Use" > "Install". If you use the add-on packages in your project you must also install the other lpk files in the same way.

It was the other three lpk files that concerned me. I do not use them knowingly but will find out. I'll uninstall the old LazMapViewer and install the new one as you suggested.

The BGA object was causing a problem so I uninstalled it and now your line demo works. However, when trying to use your example below, I get several failures.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.MapView1DrawGpsPoint(Sender: TObject;  ADrawer: TMvCustomDrawingEngine; APoint: TGpsPoint);const  R = 8;var  p: TPoint;begin  // Screen coordinates of the GPS point  p := MapView1.LonLatToScreen(APoint.RealPoint);   // Draw a blue circle  ADrawer.PenColor := clBlack;  ADrawer.BrushColor := clBlue;  ADrawer.BrushStyle := bsSolid;  ADrawer.Ellipse(p.X-R, p.Y-R, P.X+R, p.Y+R);   // Draw the point label  ADrawer.BrushStyle := bsClear;  ADrawer.FontName := 'SegoeUI';  ADrawer.FontSize := 16;  ADrawer.FontStyle := [fsBold];  ADrawer.TextOut(    p.X - ADrawer.TextWidth(APoint.Name) div 2,    p.Y + R + 4,    APoint.Name  );end;The ellipse function is unknown and causes a SIGSEGV fault. If I skip over that the blue circle does not draw anything as the TextWidth function returns a zero. If I substituted a real value, 20, it still does not draw. As soon as I click anything in my program, I get another SIGSEGV fault. Is this example not compatible with the dev version?

I am aware of crashes on Linux due to the GPS points and tracks painting, but not on Windows (which you seem to have).

That the drawer's Ellipse method is unknown could indicate that your new version is not correctly installed. Try this: Open "Tools" > "Configure Build Lazarus" and check the boxes "Clean all" and "Switch after building to automatically". Then click "Build".

Or: Open "Package" > "Install/Uninstall packages", and select the "lazmapviewerpkg.lpk" in the left listbox. When you scroll down the "Package Info" box you should see the path from where the package is used. Is this the path into which you unzipped the download? If not repeat the installation as described in the previous message.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version