Frage

I need a polyline with a width of 20 feet on a google map to track me.

The width() method is in pixels. I also understand that because google maps uses a mercator projection the pixel to distance ratio will change depending on where I am.

What is out there to work around this?

Thanks

War es hilfreich?

Lösung

Polygon with fill and without stroke should fit your requirement. Just need to calculate points that create such a shape.

Drawing many Circles with radius equal to 20 ft could also create such effect.

Andere Tipps

Much more significant than any variation from map projection is how far you are zoomed in/out.

Line width is normally chosen to provide good visibility on screen not to represent a specific dimension. You would need to continually recalculate the required number of pixels and update the poly line every time the user zoomed in or out.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top