EtheaDev / DelphiGoogleMap

Delphi WebView2 Component to View Google Map with Routing and Markers Support
Apache License 2.0
80 stars 22 forks source link

Failure to draw polylines #17

Open TonyNJones opened 6 months ago

TonyNJones commented 6 months ago

After many attempts to draw a polyline, I modified the: PutPolyline function in the VCL.GoogleMap.Pas unit as in the attachment. I'm using the 1.6.0 VCL 32-bit version.

Screenshot 2024-05-30 171556

This "fixes" the LScriptCommand in the polyline function to the default as in your demo, and it works fine in your demo. In my own application, however, the same PutPolyline command fails to draw anything and I'm struggling to see where the differences are - they are both running on the Delphi 11 (v28) IDE and on Windows 11 and the TEdgeGoogleMapViewer is set up identically in both. Do you know of any reason why this must be?
Thanks. (Enjoying the project though!) TJ

carloBarazzetta commented 3 months ago

If you want to check the problem you can change line 940 of Vcl.GoogleMap.pas to {$IFDEF DEBUG} and rebuild Demo in Debug Mode. Now the component uses a File to show the map, so you can use the static file created in the temp user folder to load into a Browser and activate debug/console panel to check if there are some problems or differences from your file and the file generated by the demo.