Linto
Linto

Reputation: 1282

Bing Map implementation

I am not familiar the bing Map

I need to display the us map for a given zip code,in a page

How can i do this

Can anyone help me please

Upvotes: 0

Views: 783

Answers (2)

Dave
Dave

Reputation: 359

It's easy using REST services which ship with Bing Api. Here you can find a blog post with thorough description.

Upvotes: 0

Jeremy Wiggins
Jeremy Wiggins

Reputation: 7299

Have a look at their API reference...

You will need to geocode the zip code first; if you only need to do this once to display a static map, then you can use this site, although there are lots of other free sites online that do the same thing. Once you have your lat/lon it's pretty straightforward to use them to center your map object.

// assume that lat, lon, and map are js variables you have already declared and set
var oLatLon = new VELatLong(lat, lon);
map.PanToLatLong(oLatLon);

If the map needs to be dynamic and you'll have to geocode addresses on the fly, then I'm not sure what the best approach is. I think there are databases that contain all zipcodes & their corresponding lat/lon coordinates available for download. It might also be worth checking out the Bing MapPoints SDK.

Upvotes: 1

Related Questions