English 中文(简体)
how to add a wms layer to a bing map using javascript?
原标题:

how do I add a wms layer to a bing map using javascript? anyone know any good examples?

最佳回答

Typically I ve used a proxy service that translates the quad key to the proper coordinates of the wms. A good start for writing such a proxy service in C# as a web handler can be found here: http://www.viawindowslive.com/Articles/VirtualEarth/AccessingWMSfromVirtualEarth.aspx

The problem lies in the way that bings maps requires you to specify a tile url. If you re not locked into bing maps, this sort of thing is much easier with Google Maps version 2.0 or Open layers as the above poster suggested.

问题回答

if you have to use WMS for the tile server, then I would seriously look at OpenLayers. This is excellent at mixing different toolkits and formats. Eg. putting KML overlays over WMS, or (as in your case) WMS over Bing Maps.

If you have your own choice of tile server and you have rasters, then I would use MapCruncher instead and load it natively in Bing Maps.





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签