Getting Styles from wms capabilities

18 views
Skip to first unread message

ranggalawe

unread,
Jan 27, 2012, 4:39:50 PM1/27/12
to openscales-dev
Hello,

import org.openscales.core.layer.capabilities.*;
import org.openscales.core.basetypes.maps.HashMap;

var wmsCap:HashMap;
var wmsURL:String = "http://localhost:8080/geoserver/wms";
var wmsGC:GetCapabilities = new GetCapabilities("wms", wmsURL,
this.capabilitiesGetter, "1.1.0");
function capabilitiesGetter(getCap:GetCapabilities):void {
this.wmsCap = getCap.getAllCapabilities();

var keys:Array = wmsCap.getKeys().sort();
for(var i:uint = 0; i < keys.length; i++){
var layerName:String = wmsCap.getValue(keys[i]).getValue("Name");

//I need this one to work to enable call to
GetLegendGraphic request
var layerStyle:Object = wmsCap.getValue(keys[i]).getValue("Style");
}
}

How to get layer Styles from openscales wms capabilities?

Erich Erlangga

unread,
Jan 28, 2012, 1:58:41 AM1/28/12
to openscales-dev
Oke i figure it out. I can actually construct the GetLegendGraphic request from Layer's Tittle
wmsCap.getValue("sf:archsites").getValue("Title");
Reply all
Reply to author
Forward
0 new messages