Skip to content

Instantly share code, notes, and snippets.

@klanjabrik
Last active December 22, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klanjabrik/6473532 to your computer and use it in GitHub Desktop.
Save klanjabrik/6473532 to your computer and use it in GitHub Desktop.
Geoserver WMS: Tiled and SingleTile Layer
// Tiled Layer
the_layer = new OpenLayers.Layer.WMS(
"My Layer",
"http://localhost:8080/geoserver/merapi/wms",
{
layers: 'merapi:desa',
isBaseLayer: false,
tiled: true,
format: 'image/png',
tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
yx : {'EPSG:26713' : false},
transparent: "true"
},
{
'buffer': 0
}
);
// SingleTile Layer
the_layer = new OpenLayers.Layer.WMS(
"My Layer",
"http://localhost:8080/geoserver/merapi/wms",
{
layers: 'merapi:desa',
isBaseLayer: false,
format: 'image/png',
yx : {'EPSG:26713' : false},
transparent: "true"
},
{
singleTile: true,
ratio: 1,
'buffer': 0
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment