WMS/WFS connection in Virtual Earth

Hello all,

MSN VE is looking fantastic and getting better. Indeed a good option against google earth. But I could easily make some php scripts that could connect WMS to Google and project data on the fly to GE and this was also possible with MySql+GE connections.

But did anybody already do an experiment to connect a WMS to MSN Virtual Earth? I would be very much delighted to have some codes if possible.

Shuman Kibria

Please contact

kibria14829@itc.nl

[566 byte] By [ShumanKibria] at [2007-12-27]
# 1
Yes, it's fairly easy to overlay WMS in 3D mode. There will be samples available soon. In 2D mode, you can overlay if the WMS server can project to Mercator, but the browser can't do reprojection on the fly. You can use something like MapCruncher to reproject as a one-time build step if your data isn't dynamic.
DuncanLawler at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 2

I'd liek to see some examples.. we use ASP and have done the WMS with Google Maps using an ArcIMS server.. I just posted yesterday on how to get our exsisting Shp files, MrSID and other ESRI based extensions to work.

.. Jason

upgraders at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 3

Hi,

Thanks for the reply. Do you have some codes available? I would like to connect my UMN mapserver to MSN VE 3d. I have looked a lot on Internet and only could find information on Tile Server. I have no idea of how to do this with a WMS.

A bit more information would be very much helpful. I am writing a research article on Virtual Earth Viewers and OGC services in a GIS magazine. Therefore it would be very nice if I could show some concrete results.

Thanks in advance for the information.

Greetings,

Shuman Kibria

kibria14829@itc.nl

ShumanKibria at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 4

In 3D, there are several parameters you can put in the tile request string when adding a tile source. These include:

URL format parameters:

0 Reserved

1 Map Style

2 Round-robin integer

3 Reserved

4 Quadkey

5 Extension

6 Generation

7 Stripe (0-3)

8 Tile Host

9 App Host

10 Language code

11 Region code

12 Tile LOD

13 Tile X

14 Tile Y

15 Low order stripe (0-1)

16 MinLong

17 MinLat

18 MaxLong

19 MaxLat

Using parameters 16-19, you can create a request that will query a WMS server, something like this:

http://igskmncngs056.cr.usgs.gov:80/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_National_Atlas?version=1.1.1&Request=GetMap&Layers=ATLAS_AVG_PRECIP&Styles=&SRS=EPSG:4326&BBOX=%16,%17,%18,%19&WIDTH=256&HEIGHT=256&TRANSPARENT=TRUE&FORMAT=image/gif

These are not yet documented in the SDK because they are not supported in 2D mode (only parameters 1-4 work in 2D). You will also have to tell the WMS server to reproject to Mercator, or you will see misalignment issues at high altitudes (the API doesn't yet have a parameter to indicate projection, so it assumes Mercator).

DuncanLawler at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 5

HI again Duncan,

I was trying to understand what you meant but I can't figure out how you can add a WMS with the parameters MinLong MinLat MaxLong and MaxLat. If you have some concrete code it would save my say.

Thanks a lot for your reply. It is being an eye opener for me in my experiences with MSN VE.

Greetings

Shuman

ShumanKibria at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 6

You add a tile layer just like the SDK describes.

try{
vemap = new VEMap('mymapcontroldiv');
vemap.LoadMap(new VELatLong(47.22, -122.44), 12, 'r', false, VEMapMode.Mode3D);
}
catch(err){
alert(err.source + ':' + err.message);
}

try{
var bounds = [new VELatLongRectangle(new VELatLong(40.707,-80.354), new VELatLong(40.317,-79.596)), new VELatLongRectangle(new VELatLong(40.337,-75.716), new VELatLong(39.725,-74.532)), new VELatLongRectangle(new VELatLong(47.999,-123.459), new VELatLong(47.149,-121.541))];
var tileSourceSpec = new VETileSourceSpecification("MyLayer","http://igskmncngs056.cr.usgs.gov:80/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_National_Atlas?version=1.1.1&Request=GetMap&Layers=ATLAS_AVG_PRECIP&Styles=&SRS=EPSG:4326&BBOX=%16,%17,%18,%19&WIDTH=256&HEIGHT=256&TRANSPARENT=TRUE&FORMAT=image/gif",1,bounds,1,19);
vemap.AddTileSource(tileSourceSpec);
}
catch(err){
alert(err.source + ':' + err.message);
}

try{
var s = new VELayerSpecification(VELayerType.VETileSource,"MyLayer","MyLayer");
s.ZIndex=100;
vemap.AddLayer(s);
}
catch(err){
alert(err.source + ':' + err.message);
}

The 3D control accepts several new parameter id's (the 2D control will ignore them, so the overlay won't work in 2D mode).

DuncanLawler at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 7

Hi Duncan,

Thanks a lot. It worked now. I am now gonna add my own data on MSN virtual earth.

Greetings

Shuman Kibria

ShumanKibria at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 8

Duncan,

Where do things stand with regard to supporting WMS in 2D these days?

Also, any thoughts on WFS?

Regards,


Dave Smith...

DavidGSmith at 2007-9-5 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...

Windows Live Developer Forums

Site Classified