[OpenLayers-Users] TMS Multiple URL's versus WMS Multiple URL's

Linda Rawson linda.rawson at gmail.com
Fri Mar 7 12:35:37 EST 2008


I can establish a WMS layer with multiple URL's.

var wmscURL = [
"http://wmsc1.terrapages.net/getmap?",
"http://wmsc2.terrapages.net/getmap?",
"http://wmsc3.terrapages.net/getmap?",
"http://wmsc4.terrapages.net/getmap?"
];
var terrapagesStreetLayer = new OpenLayers.Layer.WMS( 'TerraPages
Street',wmscURL, {layers: 'UnprojectedStreet', format: 'image/jpeg' },
{buffer: 1, isBaseLayer: true} );
map.addLayer(terrapagesStreetLayer);

Does it work the same with TMS?

I have the following definition:

var layer = new OpenLayers.Layer.TMS("Layer",
 ["http://somesite1/GetTMSImage.aspx?l=49",
"http://somesite2/GetTMSImage.aspx?l=49"
],
{type: 'jpg', getURL: osm_getTileURL, displayOutsideMaxExtent: true}
);

I have a function called osm_getTileURL that adds parameters to the
url like the following:

              &z=5&x=6&y=11

The reason I ask is when I do this it produces a div tag like the following:

<DIV style="LEFT: -17px; OVERFLOW: hidden; WIDTH: 256px; POSITION:
absolute; TOP: 177px; HEIGHT: 256px"><IMG class=olTileImage
id=OpenLayersDiv177 style="WIDTH: 256px; POSITION: relative; HEIGHT:
256px; alt: OpenLayersDiv177"
src="http://somesite1/GetTMSImage.aspx?l=49,http://somesite2/GetTMSImage.aspx?l=49&amp;z=5&amp;x=6&amp;y=11"
galleryImg="no" _eventCacheID="OpenLayersDiv177_eventCacheID_178"
viewRequestID="8"></DIV>

Notice it did not do the getURL for the first url in the definition.

-- 
Linda Rawson



More information about the Users mailing list