WMS

19 views
Skip to first unread message

Zero

unread,
Mar 8, 2011, 1:46:43 AM3/8/11
to Tile5
Hi again,
I have made a little generalized implementation of wms server
visualization. There are some unsolved problems but you can see the
wms server, correctly.I will try to find some time to improve.

I dont know if you have worked on multiscaleimage objects in both
silverlight and flash. There is a Logical Coordinate concept. I think
the implementation of such thing can improve the development process
of such thing.

I hope it can be useful to anyone.

Cheers


//to osm.js

T5.Generator.register('osm.wms', function(params) {
params = COG.extend({
extent: [-90, -180, 90, 180],
mapurl: ""
}, params);

T5.userMessage('ack', 'osm.wms', '');
params.dlat = params.extent[2] - params.extent[0];
params.dlon = params.extent[3] - params.extent[1];

return COG.extend(new OSMGenerator(params), {
buildTileUrl: function(tileX, tileY, zoomLevel, numTiles,
flipX, flipY) {
return params.mapurl + "&BBOX=" +
this.tileToExtent(tileX, tileY, zoomLevel, numTiles);
},
tileToExtent: function(x, y, zoomLevel, numTiles) {
var ddlat = params.dlat / (numTiles);
var ddlon = params.dlon / (numTiles);

var llat = (ddlon * (x)) + params.extent[0];
var tlon = params.extent[3] - (y * ddlon);
var tlat = llat + ddlon;
var llon = tlon - ddlon;
return llat + "," + llon + "," + tlat + "," + tlon;
}
});
});

//an html file containing

var map = T5.Map({
container: 'mapCanvas'
}),
tiles = map.setLayer('tiles', new T5.ImageLayer('osm.wms',
{
mapurl: "http://www2.demis.nl/worldmap/wms.asp?
Service=WMS&Version=1.1.0&Request=GetMap&WIDTH=256&HEIGHT=256&SRS=EPSG:
4326&Layers=Countries&Format=image/png&"
}));

// goto the specified position
map.gotoPosition(T5.Geo.Position.init(0,0), 2);

Damon Oehlman

unread,
Mar 24, 2011, 6:32:11 PM3/24/11
to ti...@googlegroups.com, Zero
Thanks heaps for this - sorry I haven't replied earlier.  I've been buried in code doing changes as per usual...

I'll have a look at integrating this as part of the current development work that I'm doing.  Especially given that I made some changes last night to the Tile5 site so you can actually switch between map engines again now.

In terms of showcasing WMS support as part of the demos, does anyone know of a WMS server that is ok with people using their tiles?  Can the Demis server be used?  I'll certainly include a link back in map tiles, hosting acknowledgement area (shown under the bottom right of the map now).

Cheers,
Damon.

Baris Goral

unread,
Mar 25, 2011, 9:47:34 AM3/25/11
to ti...@googlegroups.com
On Fri, Mar 25, 2011 at 12:32 AM, Damon Oehlman <damon....@gmail.com> wrote:
Thanks heaps for this - sorry I haven't replied earlier.  I've been buried in code doing changes as per usual...

As we all ...

 

I'll have a look at integrating this as part of the current development work that I'm doing.  Especially given that I made some changes last night to the Tile5 site so you can actually switch between map engines again now.

In terms of showcasing WMS support as part of the demos, does anyone know of a WMS server that is ok with people using their tiles?  Can the Demis server be used?  I'll certainly include a link back in map tiles, hosting acknowledgement area (shown under the bottom right of the map now).

Cheers,
Damon.

As i know most of the projects uses demis server. i think it may be used and also nasa jpl ise commonly used too.

Cheers.

Baris Goral

unread,
Mar 25, 2011, 9:50:56 AM3/25/11
to ti...@googlegroups.com


In addition, just to inform, most of the time tile5.org unreachable -for example now- Maybe this a special case for my country -Turkiye-.

Reply all
Reply to author
Forward
0 new messages