highlight a list of streets on a map
Asked Answered
O

3

2

We have a database of addresses that we deliver to. It consists of the following data;

StreetName
NumberFrom
NumberTo
ZipcodeId (points to seperate table with zipcodes, which holds cityName)
StoreId

Would it be possible to highlight all those addrresses on a map like GoogleMaps (preferred), Bing, OpenStreetMap, etc. ?

I know how to add polylines, and have done geocoding in the past for addresses.

A possible issue with the data, is where it covers whole street they practise have been to just set the NumberTo to 9999. If i plot an address into google Earth with 'StreetName 999, City' it will place the point in the middle of the length of the street.

Also tried a random number, and it placed the marker on a building instead of on the street.

I don't know if it's different for GoogleMaps..

Update

I think that the DirectionsService in GoogleMaps API is the way to go, now i only need to figure out if and how i can use it multiple times on a map.

Osric answered 15/6, 2011 at 10:48 Comment(0)
O
3

Success!

I was able to iterate over all the addresses, doing a DirectionsService request for each addres, from start of street to end of street. Extract the GeoPoints used by DirectionsDisplay, stored it to the database and is now able to draw Polylines on a map for each road.

I could iterate over the addresseseach time the map is shown (in-house use only). But still this would be a performance issue, and also unsure if how many request Google will handle per day. By storing it in DB i only need Google to calculate it once.

Osric answered 15/6, 2011 at 13:41 Comment(0)
G
0

It can, but only in certain areas of the world - e.g. US

But you need to prepare your adresses - lets say in div/spans - then on onload document, you calll the API

I did this using Lat/Lng from a Garmin Edge - the difference is that you need to translate your addresses into lat/lng, before you can position these on the map canvas.

Mike

Gisela answered 15/6, 2011 at 10:55 Comment(3)
Well i know how to show polylines on a map, did that last week with data from a GPS tracker. Please have a look at my updated post.Osric
See this: code.google.com/apis/maps/documentation/geocoding/…Gisela
ReverseGeocoding is absolutely not what i'm looking for.Osric
C
0

Yes you can convert the Address to a GeoPoint and then plot the GeoPoints on the Map. Start by looking here

Castiron answered 15/6, 2011 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.