Topic: How to draw a path between 2 marker points?

Main Question:

Let's say I have 2 markers, each marker is a good bit off-the-road, but with some roads between them -- is there any way to draw a path using the main roads from one marker to the other?

If not, how would I at least draw a straight line pointing to the other marker from another marker?



Second Question:

Is there any way to draw directly to the displayed tile image textures the markers are on in the Tileset view model? Could this be done through Android?

Re: How to draw a path between 2 marker points?

Hello.

1. Example:
http://infinity-code.com/atlas/online-m … ample.html

2. Unfortunately, I did not understand your question. Please rephrase it.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to draw a path between 2 marker points?

1A. This is neat, but can it take into account 2 arbitrary Lat/Lon locations and try to find a path between them? For example, can I literally pass in 2 separate lat/lon positions out in 2 open fields far away from each other, will it try to find the roads to take to bring you to those exact locations (instead of passing an address, for example?)

1B. Also, even if this is possible, it doesn't explain how to actually draw a straight line from one marker to another if I wanted to. It'd be nice to be able to have both options if necessary.


2A. I'd like to have an overlay of custom roads or paths that I can draw *directly* on the tiled texture surfaces when they appear so that it only takes a single draw call to draw my custom paths. How would this be accomplished without having to put another drawing layer on top of the textures as you did with the markers?

2B. How would you find out if a given point has passed the edge of the visible tile area in any direction? I'm assuming you did this with your markers, but I'm not sure where to look to figure this out.

Re: How to draw a path between 2 marker points?

1a. Yes.

1b. Each marker has the coordinates.
Create a line that has two coordinates (start and end).
Example:
http://infinity-code.com/atlas/online-m … ample.html

2a. Theoretically, you can draw directly on the tile.
But it's very, very bad idea, because it requires a lot of CPU time, and can not be changed or deleted.
You will only be able to download the tile again.

2b. You can see it in OnlineMapsDrawingElement.DrawLineToBuffer method.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

5 (edited by astraldata 2016-06-18 14:39:51)

Re: How to draw a path between 2 marker points?

1a. Thanks for this.

1b. Not sure that example you gave shows how to draw a line between 2 markers/points... sad


2a. Thank you for this as well, but how do you suggest drawing a number of custom paths with intersections, etc. as an overlay on the map if I have a collection of lat/lon points I want to make into pathways?

2b. I'm unfamiliar with the step-by-step process of drawing a line, etc., on the map without having to resort to messing with the mesh and UVs (like in the Dotted Line example) -- surely there's an easier way to draw a simple line? The descriptions of the functions are very short and are hard to interpret what they do and how they fit into the whole process. Could you give me a step-by-step on the process of using OnlineMapsDrawingElement.DrawLineToBuffer in the context of drawing a line at a given position in the world? I'd probably need to look at code to understand this. sad

Re: How to draw a path between 2 marker points?

1b. Sorry, wrong link:
http://infinity-code.com/atlas/online-m … ample.html

2a. See an example in 1b.

2b. The easiest way to draw a line in the example above.
But your original question was about something else.
I made a small example (attached), to show how it works.
I hope it will be easier to understand.

Post's attachments

Attachment icon CheckLocationOnMap.cs 1.74 kb, 178 downloads since 2016-06-20 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to draw a path between 2 marker points?

Thank you! That's very much what I needed! smile