|
|
Raster LayersSince a raster layer has no attributes or vector styles, it's configuration is quite different from a vector layer. Some parameters are of course required for both types (such as a label), while some are specific for the raster type. On this page, we will try to explain the possibilities you have in creating a raster layer definition. We will start with the basic XML tag for a raster layer. Note that it holds an ID-tag, which should always be unique! <layer xmlns="http://geomajas.org/schemas/configuration/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
id="unique_id"
xsi:type="rasterLayerInfo">
...We will now go over all the parameters one by one. Note that all parameters are case sensitive! We start with the general parameters. You will find that a vector layer starts with the same parameters.
Now on to the raster layer specific parameters:
ExampleBelow is an example of a raster layer, taken from the online samples, that show an Open Street Maps raster layer. <layer xmlns="http://geomajas.org/schemas/configuration/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="osm" xsi:type="rasterLayerInfo"> <label>OpenStreetMap</label> <visible>true</visible> <layerType>1</layerType> <crs>EPSG:900913</crs> <viewScale> <min>0</min> <max>50</max> </viewScale> <maxExtent> <minX>-20037508.34</minX> <maxX>20037508.34</maxX> <minY>-20037508.34</minY> <maxY>20037508.34</maxY> </maxExtent> <maxTileLevel>16</maxTileLevel> <rasterLayerFactoryRef>osm</rasterLayerFactoryRef> <layerName></layerName> <tileWidth>256</tileWidth> <tileHeight>256</tileHeight> <style>1</style> <resolutions> <resolution>156543.03</resolution> <resolution>78271.52</resolution> <resolution>39135.76</resolution> <resolution>19567.88</resolution> <resolution>9783.94</resolution> <resolution>4891.97</resolution> <resolution>2445.98</resolution> <resolution>1222.99</resolution> <resolution>611.49</resolution> <resolution>305.75</resolution> <resolution>152.874057</resolution> <resolution>76.4370283</resolution> <resolution>38.2185141</resolution> <resolution>19.1092571</resolution> <resolution>9.55462853</resolution> <resolution>4.77731427</resolution> <resolution>2.38865713</resolution> <resolution>1.19432857</resolution> </resolutions> </layer>
|



