Topic: Connect multiple markers with a line
Hello
Is there a simple way to connect multiple 2d Markers with a line?
Thanks
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → Connect multiple markers with a line
Hello
Is there a simple way to connect multiple 2d Markers with a line?
Thanks
Hello.
OnlineMapsDrawingElementManager.AddItem(
new OnlineMapsDrawingLine(
OnlineMapsMarkerManager.instance.Select(m => m.position).ToArray(),
Color.red,
3));
But simple isn't always the best.
thanks for the fast answer
This looks like the solution i need but i need a bit of help implementing it.
Where do I put this script so that it connects my 2d markers in order with a line?
Make your own script, and put that code in the right place.
The right place depends on your conditions and needs.
If you have created markers using the inspector, you can put this code in the Start method.
That worked great, thank you!
Using the navigation script and navigation route drawer, I currently have a path set from wherever the user is when they open the app to a start point. They will then be following a predetermined trail. I have markers set in the inspector and they will follow them sequentially.
Using the code provided I have now been able to draw a line between markers, which works well. However it would be great if I could instead use google api to waypoint at each marker too.
Any suggestions how to go about this?
Example: https://infinity-code.com/atlas/online- … ample.html
Infinity Code Forum → Online Maps Help → Connect multiple markers with a line
Powered by PunBB, supported by Informer Technologies, Inc.