Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am creating a web app that allows users to easily edit feature attributes as well as geometry. I have editing working by loading a WFS layer, but it slows the app to a crawl when there's more than a couple dozen features on the screen.

Instead of loading all of the features as vectors, I want to display them as a raster layer, then when a feature is clicked, grab the associated vector for that feature, in order to allow for editing. Has anyone done this before, or know of the best way to go about this?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

This is very easy to do.

  1. Show your data as a WMS service.

  2. When your user clicks on the map,get the id of the feature, either by using a WFS getfeature or WMS getfeatureInfo.

  3. Once you get the unique id, create a vector layer with wfs Protocol, and a dynamically built CQL.

You will get just the selected feature in the WFS layer.

share|improve this answer
    
good answer, good timing. this was next on my list. I just finished doing something similar but by using latlon results from plugin leaflet.geosearch and cql call to geoserver. you make it sound easy, thanks –  geomajor56 Jan 26 '13 at 3:14
    
@geomajor56 Most things are conceptually very simple; It is the implementation that is the hard part. –  Devdatta Tengshe Jan 27 '13 at 14:56
    
Thanks Devdatta. I was thinking it is something along these lines. I got it implemented by using a Logical filter to filter the WFS layer by the clicked FeatureId. –  Tanner Jan 29 '13 at 21:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.