question

BalasahebMolawade-3927 avatar image
0 Votes"
BalasahebMolawade-3927 asked asergaz commented

Plot direction on map from collection of latitude and longitude

Hi

We have collection of Latitude and longitude, say suppose users location history. We have almost 200-300 records and we want to plot route from those records. That has latitude and longitude but not proper direction so we want to generate direction from those points. Is there any way to do that. We are using Bingmap V8 API.

Waiting for your reply.

Thanks!

Balasaheb

windows-maps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IoTGirl avatar image
0 Votes"
IoTGirl answered asergaz commented

Are you expecting all those points on one route? Were they collected from a drive? Maybe the Snap to road API is what you need?

Note: If you know the order of the points, you can pass a GeoXML file with the points to create a line as shown in https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk/geoxmlreadfromurl

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi.

Thanks for your response.

Please check our comments for your question.

Are you expecting all those points on one route?

Yes we want to see all points on one route. Is there any other way to show only few points but it cover whole route from start point to end point.

Were they collected from a drive?

We have store them in database in following format (lat,long)

Maybe the Snap to road API is what you need?

Yes it may help . We are checking this API.

Note: If you know the order of the points, you can pass a GeoXML file with the points to create a line as shown in

We know the order but points is in string format (lat,long; lat1,long1;.....) not in geoxml file. How can we use Geoxml file when we have latititude and longitude in string format.

Please let me know your reply for the same.

Waiting for your reply.

Thanks!

Balasaheb









0 Votes 0 ·
IoTGirl avatar image IoTGirl BalasahebMolawade-3927 ·

Hi @BalasahebMolawade-3927,
You can push the points directly like this sample does but use a line instead of a polygon. https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk/wktaddgeometrycollection. However, it should be fairly straight forward to convert your text points to JSON or XML as well.
Sincerely,
IoTGirl

0 Votes 0 ·

@BalasahebMolawade-3927,
Please share with us if you have any other questions related with your original post. Otherwise could you go ahead and mark the above as answer?

Thank you so much.

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

0 Votes 0 ·