Domanda

I have a mapView with annotations on it.

I want to implement the ability to click on an annotation, and after clicking, the user see straight lines from the current clicked annotation to the others.

For example, if the user clicks on annotation 1, there will be straight lines from annotation 1 to annotation 2, 3 and the rest. The rule should be: touching an item on the map should show lines to the rest of the items on the map

I don't know how to get into it at all.

Any suggestions?

Here is an illustration.

enter image description here

È stato utile?

Soluzione

I am not sure, what you wanna to do with just a straight line on a plain of a Map, but here is a complete example that you need to understand.

enter image description here

Just skip the last section of drawing the exact Route-Map, or else you will end up in making a real route.

Now the touch & detect annotation should be a simple logic to make a source & rest all as destination.

Hope that helps.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top