Parses the URL of the application and fine-tunes the applications initial state. HSLayers.Control.ArgParser is little bit more advanced, then the standard OpenLayers.Control.ArgParser.
It is able to parse (beside the things, OpenLayers version is able to parse)
- pincoords
- adds google-like Pin with Popup bouble and description
- markers
- adds just the markers without bouble
- vectors
- render vectors in WKT into the map
- ows
- parse WMS or WFS get capabilities
- cgimapserver
- add new layer to the map of type mapserver-cgi with specified parameters.
Code example
// create vector layer for possible vector features
var vlayer = new OpenLayers.Layer.Vector("vector layer",{displayInLayerSwitcher: false});
// create marker layer for possible markers
var mlayer = new OpenLayers.Layer.Marker("marker layer",{displayInLayerSwitcher: false});
// create the argparser control
var argparser = new HSLayers.Control.ArgParser({
vlayer: vlayer,
mlayer: mlayer,
// what should be done when...
handlers: {
ows: function(url) {
// do something
}
},
scope: this
});
map.addControl(argparser);
What it should do:
http://portal.plan4all.eu/map/?SID=&lang=eng&zoom=0&vectors=GEOMETRYCOLLECTION(POLYGON((4602166%203270083%2C4291722%203051361%2C4517499%202677417%2C4976110%202726805%2C4947888%203121916%2C4602166%203270083)))&lat=3450000&lon=4200000&layers=BTTTT