|
From: Edwin C. <com...@gm...> - 2010-02-05 10:16:20
|
Hi Bob,
I wrongly presumed that Dave added code for the WFS Layer, but it was
for the WFSProtocol. I found out when making a start on adding a WFS
example.
It seems to me then that the WFS implementation is yours. Would you
feel comfortable adding that to the codebase? If so, then I will add
you as a developer. Alternatively, you can send me the files and I
will make sure they make it into the codebase promptly.
Coming monday I hope to have a bit of time to see what needs to be
done to get a new GWT-OL release out shortly and it would be nice if
the WFS stuff can be in it.
Greetings,
Edwin
On 5 February 2010 01:14, Edwin Commandeur <com...@gm...> wrote:
> Hi Bob,
>
> That's great that you have already have some proxy code. Would you
> mind if I merge that into GWT-OL? It looks just fine for our purposes.
>
> I would really have to dive into the WFS stuff to see what's going on.
>
> I will make it high priority to add a WFS example, so I can try to
> reproduce what's going on. Sorry that I cannot help you on a shorter
> notice.
>
> Greetings,
> Edwin
>
> On 4 February 2010 19:33, Robert Light <rob...@ve...> wrote:
>> To proxy, I just used the servlet (see attached) which worked just fine for
>> me.
>>
>> - Bob
>>
>> Edwin Commandeur wrote:
>>
>> Hi Robert,
>>
>> The WFS functionality is a recent contribution by Dave, maybe he
>> recognizes the problem easily. I still need to get working on a Java
>> port of the Open Proxy that is necessary for the WFS functionality and
>> that is included in the OpenLayers examples.
>>
>> How are you running your code? Is the Python Open Proxy implementation up?
>>
>> The dev list is not publicly visible as far as I am aware, but I have
>> cc'd this reply to the devl list.
>>
>> Greetings,
>> Edwin
>>
>>
>> On 4 February 2010 16:54, Robert Light <rob...@ve...> wrote:
>>
>>
>> Edwin,
>>
>> I think I've found a bug either in openlayers or in gwt-openlayers code.
>>
>> if I create a WFS layer:
>> WFSParams wfsParams = new WFSParams();
>> wfsParams.setTypename("topp:states");
>> WFSOptions wfsLayerOptions = new WFSOptions();
>> wfsLayerOptions.setTransitionEffect(TransitionEffect.RESIZE);
>> wfsLayerOptions.setExtractAttributes(true);
>>
>> WFS wfsLayer = new WFS(
>> "states",
>> "http://192.168.1.167:8080/geoserver/wfs",
>> wfsParams,
>> wfsLayerOptions);
>>
>> and then I want to get selection events so I do:
>>
>> wfsLayer.addVectorFeatureSelectedListener( new
>> VectorFeatureSelectedListener() {
>>
>> public void onFeatureSelected(FeatureSelectedEvent
>> eventObject) {
>> JSONObject map = new
>> JSONObject(eventObject.getVectorFeature().getJSObject().getProperty("attributes"));
>> System.out.println("Feature.id =
>> "+eventObject.getVectorFeature().getId());
>> for( String key : map.keySet()) {
>> System.out.println(key+"="+map.get(key));
>> }
>> }
>> });
>>
>> This does not work... my VectorFeatureSelectListener never get's called.
>>
>> To make this work, I had to add the following:
>> SelectFeatureOptions selectFeatureOptions = new
>> SelectFeatureOptions();
>> selectFeatureOptions.onSelect( new
>> SelectFeature.SelectFeatureListener() {
>>
>> public void onFeatureSelected(VectorFeature vectorFeature) {
>> JSONObject map = new
>> JSONObject(vectorFeature.getJSObject().getProperty("attributes"));
>> for( String key : map.keySet()) {
>> System.out.println(key+"="+map.get(key));
>> }
>> }
>> });
>>
>> SelectFeature selfeature = new SelectFeature(wfsLayer,
>> selectFeatureOptions);
>> map.getMap().addControl(selfeature);
>> selfeature.activate();
>>
>>
>> And now BOTH my VectureFeatureSelectListener AND my SelectFeatureListener
>> get called when I select a feature.
>>
>> To put another wrinkle in the puzzle....instead of adding the SelectFeature
>> Control as above, I do just the following:
>>
>> SelectFeature selfeature = new SelectFeature(wfsLayer);
>> map.getMap().addControl(selfeature);
>> selfeature.activate();
>>
>> My VectorFeatureSelectListener does NOT get called.
>>
>> Any ideas? Is there a developer's list I should post this query to?
>>
>> Note, I'm working off the latest set of sources that I downloaded via
>> mercurial.
>>
>> many thanks.
>>
>> - Bob Light
>>
>>
>>
>>
>>
>
|