Tag Info

Hot answers tagged

9

which layer do you want, i dont understand? but getting all layer: map.layers getting all layer name: var mLayers = map.layers; for(var a = 0; a < mLayers.length; a++ ){ alert(mLayers[a].name) }; getting last added layer name: map.layers.getLast().name and beside this you can use all this method too: 1.map.getLayer() 2.map.getLayerIndex() ...


6

In OpenLayers, you can generate filters programmatically using the OpenLayers.Filter classes. These can be used in conjunction with the vector layers using the WFS protocol to be serialized with OGC Filter Encoding. We have a filter example demonstrating filter serialization and several examples demonstrating the WFS protocol. If a vector layer has a ...


5

Which mapserver are you running/requesting maps from? According to Geoserver CQL Tutorial: CQL provides a full set of geometric filter capabilities. Say, for example, you want to display only the states that do cross the (-90,40,-60,45) bounding box. The filter will be BBOX(the_geom, -90, 40, -60, 45)


3

You have not posted a complete example of the url you are building and sending to GeoServer so it is difficult to know for sure what the problem is. However, I suspect the problem lies in the use of the % for the wildcard. In a url the % character has a special meaning as it is used when certain characters should be encoded. For example, you may well recall ...


3

There is no way to do that. If you want to get the highest value of a filed you have to use WPS, GeoServer has a process that does basic statistics on fields, including the max value.


3

As far as I know these are not supported by anyone else as they are a vendor specific parameter that is added by GeoServer. I also don't believe there is anyway to determine the vendor specific parameters from the capabilities request.


3

No. The list of valid parameters is here. CQL_filter is a geotools "vendor parameter". Vendor parameters are options that are not defined in the official WMS specification, but are allowed by it. The danger in using it is that no client is obligated to use it, or even to acknowlege that it exists. ArcGIS does expose a query interface using a web form, ...


2

If you only ever need to talk to GeoServer then CQL is easier to create and understand. If you intend to talk to any server out there then stick with the OGC Filter spec as there is more chance that a random server will implement that. AFAIK there is no functional difference between them at the server end, certainly GeoServer will convert them into the same ...


2

One approach would be to use the OGC Common Query Language (CQL) to generate your expressions and then use the OpenLayers CQL parser to convert to an OGC Filter. A description of the process can be found here.


2

It seems you are using the cross layer filtering plugin: http://docs.geoserver.org/stable/en/user/extensions/querylayer/index.html Did you read and apply the hints in the "optimizing the module speed" section? The hint is needed only for the 2.1.x series, the 2.2.x won't benefit from it


2

did you pass the CQL filter to the WMS GetFeatureInfo request too? If not then any record in the whole dataset at that location will be returned.


2

You can use WFS GetFeature, either encoding the filter in CQL or Filter. Something like: http://host:port/geoserver/wfs?service=WFS&version=1.0&request=GetFeature&typeName=myLayer&CQL_FILTER=INTERSECT(the_geom, POLYGON((...)))&propertyName=data1,data2,data3


2

On your second question: An SLD can be created dynamically, which means it can style maps using dynamic data. For this to work you will need to know the IDs of the polygons you're trying to style and you also need to alter / expand your web service. Have your web service generate SLDs on-the-fly instead of just returning data. This is simple enough using ...


2

Thanks for reply. I didn't know this log file. Really a great help! Here is the solution for my problem: http://myserver:8080/geonetwork/srv/eng/csw?SERVICE=CSW&version=2.0.2 &REQUEST=GetRecords&resultType=results &constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0 &constraint=TempExtent_begin%20>=%20'2014-10-12T00:00:00Z' ...


1

As far as I know this is not supported. Ask from geoserver-users mailing list first and make a feature request to Geoserver jira because it feels like a useful addition. Meanwhile you can use the standard OGC filter instead <Filter> <Intersects> <PropertyName>the_geom</PropertyName> <gml:Point ...


1

As far as I know, it doesn't work with WMS. I've also recently started working the OpenLayers, with GeoServer. I work for a County in n'rn Wisconsin, and wanted a map that would filter by parcel number and zoom to the filtered parcels. I searched Google a couple days, and came to the conclusion it didn't work with WMS. Might be because WMS just requests ...


1

Since you are using GeoServer, you can use strToLowerCase() function, while passing the search term in lower case as well. The following code should work: var filter_c = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LIKE, property: 'strToLowerCase(p_name)', value: ...


1

http://***/geoserver/Kaski/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Kaski:PIN&maxFeatures=50&outputFormat=json&featureID=97 not use cql_fiter it is working. thanks anyway


1

You can ask for two layers in your WMS request - one with all the parcels drawn (use your usual or a default style) and a second with the filter and a different style specified. The url will look like normal but for layers=parcels,parcels&styles=,red&cql_filter=;ParcelID=1 Note the ; at the beginning of the filter to show there is no filter ...


1

The same issue has been well answered in this question. But here is a quick answer, the reason is that by the time you call pins.getDataExtent() the wfs protocol has not finished reading all the features, so the _CallBack has not been executed. In your case you may zoom to layer's data extent after add features to the layer, i.e. in _CallBack function after ...


1

Assuming that you are running GeoSolution's fork of Mapfish then the code you have there will work. So I would suspect that there is some issue with your setup as even if you are running the stock set up all it does is ignore your CQL Filter.


1

Following Dynamic SLD styling - unique colours for linestrings I would suggest adding a "color value" column to your postGIS table is the easiest solution. The column should always be updated with respect to the current range of GDP values. Then, you might access it in your SLD with a PropertyValue in the CssParameter tag.


1

The "solution" I implemented was to import the shapefiles into a postGIS database using shp2pqsql, which resolved the disappearing point features when using a CQL Filter. I can make the exact same CQL filter request and see all the points at all zoom levels now. I then had to tweak a few automated processes to update the postGIS database instead of ...


1

The short answer is - yes, its very much possible! There are actually a variety of ways you could tackle this problem. Here is one such way I can think of. There are 2 parts to your question here. 1) Represent Static AND Dynamic data coming from external sources in GeoServer. Create a layer group say "Regional Map" with 2 layers. Layer 1 (Static) is the ...


1

The '%' character should be encoded as '%25' inside a URL.


1

i didnt understand why did you tranform your point to 4326 to 4326? Do you think this is not the problem for wrong location? and openlayers cql example is so good to understand it. firstly you are defining CQL parser then you can get your filter with format.read(cql.value). The last thing is that adding your features to your map... You can also add your ...


1

you can try: var dataExtent = vectors.getDataExtent(); map.zoomToExtent(dataExtent); or map.zoomToExtent(vectors.getDataExtent()); . vectors is the layer which you add features from CQL_Filter. you can try it here with firebug writing this to console: map.zoomToExtent(states.getDataExtent()) UPDATE: var fixWMSLayerExtent = function(layer) { var ...


1

you can try by using Firebug (with firefox browser) and insert "console.dir(map.layers);" in your javascript code to show layer details.


1

I think your scoping has gone haywire. (if i understand your code corrctly) You have two functions: createWmsLayer and CQLfilter. in the line var ikke_listet = new createWmsLayer... you assign the returned value of the call to createWmsLayer to the variable ikke_listet. The problem is that createWmsLayer does not return anything. So, you should rewrite ...


1

I don't know for GeoNetwork, but a CSW compliant request should probably look more like the following: http://serverurl/geonetwork/srv/en/csw? REQUEST=GetRecords& SERVICE=CSW& VERSION=2.0.2& namespace=xmlns(csw=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2F2.0.2)& OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd& ...



Only top voted, non community-wiki answers of a minimum length are eligible