[Script] WME Place Interface Enhancements

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Moderators: Unholy, bextein, Glodenox, JustinS83

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME Place Interface Enhancements

Postby MajkiiTelini » Tue Feb 18, 2020 8:25 pm

Distance showed by Google Link Enhancer is wrong - it is the distance on flat Earth. But repair is simple.
Old code (lines 512+513):
Code: Select all
lsLine = new OL.Geometry.LineString([splitPoints.components[0], splitPoints.components[1]]);
let distance = poiPt.distanceTo(placePt);

New code:
Code: Select all
let distance = lsLine.getGeodesicLength(new OL.Projection("EPSG:3857"))
lsLine = new OL.Geometry.LineString([splitPoints.components[0], splitPoints.components[1]]);

Please merge it into code of GLE. Thanks!
ImageImageImage
LC Czech Republic
MajkiiTelini
Area Manager
Area Manager
 
Posts: 557
Joined: Tue Sep 23, 2014 5:45 pm
Location: CZ
Has thanked: 107 times
Been thanked: 241 times

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: Mythdraug