Hi, all,
I tried WFS-T demo with my shapefiles. The WfsGetFeature, however, doesn't work
for my data, though it looks fine in the original demo. Below is the code of
WfsGetFeature widget, I only changed the <typeName> part.
<WfsGetFeature id="wfsGetFeature">
<buttonBar>mainButtonBar</buttonBar>
<targetModel>mainMap</targetModel>
<mouseHandler>mainMouseClick</mouseHandler>
<class>RadioButton</class>
<enabledSrc>/images/QueryEnable.png</enabledSrc>
<disabledSrc>/images/QueryDisable.png</disabledSrc>
<transactionResponseModel>featureCollection</transactionResponseModel>
<webServiceUrl>../wfs</webServiceUrl>
<typeName>topp:stn</typeName>
<tolerance>10</tolerance>
</WfsGetFeature>
My test link is
http://129.89.71.229:8080/geoserver/CASIR/index.html
Any help would be appreciated!
Best,
Yanlin
This is more a question for MapBuilder, you should ask on their list. I remember once doing someting like this and I had trouble with namespaces.
Chris
Yanlin Weng wrote:
Hi, all,
I tried WFS-T demo with my shapefiles. The WfsGetFeature, however, doesn't work
for my data, though it looks fine in the original demo. Below is the code of
WfsGetFeature widget, I only changed the <typeName> part.
<WfsGetFeature id="wfsGetFeature">
<buttonBar>mainButtonBar</buttonBar>
<targetModel>mainMap</targetModel>
<mouseHandler>mainMouseClick</mouseHandler>
<class>RadioButton</class>
<enabledSrc>/images/QueryEnable.png</enabledSrc>
<disabledSrc>/images/QueryDisable.png</disabledSrc>
<transactionResponseModel>featureCollection</transactionResponseModel>
<webServiceUrl>../wfs</webServiceUrl>
<typeName>topp:stn</typeName>
<tolerance>10</tolerance>
</WfsGetFeature>
My test link is
http://129.89.71.229:8080/geoserver/CASIR/index.html
Any help would be appreciated!
Best,
Yanlin
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:1003,459d6d97268961219810056!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org
There is a template file that goes along with each feature type in the demo (template_cities.xml and template_road.xml). You will need a template for your feature type in order to edit the data and make requests off of it. Also check in your browser and see what javascript errors are coming up. In firefox you can view them by going to: Tools -> JavascriptConsole
Tell me how it goes,
Brent Owens
(The Open Planning Project)
Yanlin Weng wrote:
Hi, all,
I tried WFS-T demo with my shapefiles. The WfsGetFeature, however, doesn't work
for my data, though it looks fine in the original demo. Below is the code of
WfsGetFeature widget, I only changed the <typeName> part.
<WfsGetFeature id="wfsGetFeature">
<buttonBar>mainButtonBar</buttonBar>
<targetModel>mainMap</targetModel>
<mouseHandler>mainMouseClick</mouseHandler>
<class>RadioButton</class>
<enabledSrc>/images/QueryEnable.png</enabledSrc>
<disabledSrc>/images/QueryDisable.png</disabledSrc>
<transactionResponseModel>featureCollection</transactionResponseModel>
<webServiceUrl>../wfs</webServiceUrl>
<typeName>topp:stn</typeName>
<tolerance>10</tolerance>
</WfsGetFeature>
My test link is
http://129.89.71.229:8080/geoserver/CASIR/index.html
Any help would be appreciated!
Best,
Yanlin
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Hi Yanlin,
As quoted from Yanlin Weng <weng@anonymised.com>:
I tried WFS-T demo with my shapefiles. The WfsGetFeature, however,
doesn't work for my data, though it looks fine in the original demo.
Below is the code of WfsGetFeature widget, I only changed the
<typeName> part.
<WfsGetFeature id="wfsGetFeature">
<buttonBar>mainButtonBar</buttonBar>
<targetModel>mainMap</targetModel>
<mouseHandler>mainMouseClick</mouseHandler>
<class>RadioButton</class>
<enabledSrc>/images/QueryEnable.png</enabledSrc>
<disabledSrc>/images/QueryDisable.png</disabledSrc>
<transactionResponseModel>featureCollection</transactionResponseModel>
<webServiceUrl>../wfs</webServiceUrl>
<typeName>topp:stn</typeName>
<tolerance>10</tolerance>
</WfsGetFeature>
My test link is
http://129.89.71.229:8080/geoserver/CASIR/index.html
The problem is probably that in the version of MapBuilder shipped with
Geoserver the feature name is hard-coded as "topp:CITY_NAME" in
../mb/lib/model/FeatureCollection.js
Copy that file to CASIR/FeatureCollection.js, change the
"topp:CITY_NAME" to whatever it should be for you. Also look at the
coordSelectXpath, perhaps that needs changing also for your data.
Then add the following line to the <FeatureCollection ...> part in your
config.xml:
<scriptFile>FeatureCollection.js</scriptFile>
Let me know if that helps.
Kind regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600
Hi, Brent,
Thanks for your quick response!
I changed the query layer from topp.stn (line feature) to topp.bridge (point
feature) and created template_bridge.xml file in CASIR folder.
Still, no table-like feature information showed up. The javascriptConsole looks
fine, and the geoServer console as well. Here is a piece information from
GeoServer console at the time of a query request:
queries:
Query
feature type: topp:bridge
filter: [ null intersects POLYGON ((-88.67121425975711 42.839677055261554, -8
8.67121425975711 42.86917009437946, -88.64444179679796 42.86917009437946, -88.64
444179679796 42.839677055261554, -88.67121425975711 42.839677055261554)) ]
[properties: ALL ]
Thanks!
Best,
Yanlin
Quoting Brent Owens <brentowens@anonymised.com>:
There is a template file that goes along with each feature type in the
demo (template_cities.xml and template_road.xml). You will need a
template for your feature type in order to edit the data and make
requests off of it. Also check in your browser and see what javascript
errors are coming up. In firefox you can view them by going to: Tools ->
JavascriptConsole
Tell me how it goes,
Brent Owens
(The Open Planning Project)
Yanlin Weng wrote:
> Hi, all,
>
> I tried WFS-T demo with my shapefiles. The WfsGetFeature, however, doesn't
work
> for my data, though it looks fine in the original demo. Below is the code
of
> WfsGetFeature widget, I only changed the <typeName> part.
>
> <WfsGetFeature id="wfsGetFeature">
> <buttonBar>mainButtonBar</buttonBar>
> <targetModel>mainMap</targetModel>
> <mouseHandler>mainMouseClick</mouseHandler>
> <class>RadioButton</class>
> <enabledSrc>/images/QueryEnable.png</enabledSrc>
> <disabledSrc>/images/QueryDisable.png</disabledSrc>
> <transactionResponseModel>featureCollection</transactionResponseModel>
> <webServiceUrl>../wfs</webServiceUrl>
> <typeName>topp:stn</typeName>
> <tolerance>10</tolerance>
> </WfsGetFeature>
>
> My test link is
> http://129.89.71.229:8080/geoserver/CASIR/index.html
>
> Any help would be appreciated!
>
> Best,
> Yanlin
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
Hi, Gertijan,
Thank you for your response. I did what you suggested, and also changed the
query layer from topp:stn (line feature) to topp:bridge (point feature). But
the result is still same: Only the letters of "Feature List" show up, no
detailed information of the queryed feature.
Thanks.
Best,
Yanlin
Quoting Gertjan van Oosten <gertjan@anonymised.com>:
Hi Yanlin,
As quoted from Yanlin Weng <weng@anonymised.com>:
> I tried WFS-T demo with my shapefiles. The WfsGetFeature, however,
> doesn't work for my data, though it looks fine in the original demo.
> Below is the code of WfsGetFeature widget, I only changed the
> <typeName> part.
>
> <WfsGetFeature id="wfsGetFeature">
> <buttonBar>mainButtonBar</buttonBar>
> <targetModel>mainMap</targetModel>
> <mouseHandler>mainMouseClick</mouseHandler>
> <class>RadioButton</class>
> <enabledSrc>/images/QueryEnable.png</enabledSrc>
> <disabledSrc>/images/QueryDisable.png</disabledSrc>
> <transactionResponseModel>featureCollection</transactionResponseModel>
> <webServiceUrl>../wfs</webServiceUrl>
> <typeName>topp:stn</typeName>
> <tolerance>10</tolerance>
> </WfsGetFeature>
>
> My test link is
> http://129.89.71.229:8080/geoserver/CASIR/index.html
The problem is probably that in the version of MapBuilder shipped with
Geoserver the feature name is hard-coded as "topp:CITY_NAME" in
../mb/lib/model/FeatureCollection.js
Copy that file to CASIR/FeatureCollection.js, change the
"topp:CITY_NAME" to whatever it should be for you. Also look at the
coordSelectXpath, perhaps that needs changing also for your data.
Then add the following line to the <FeatureCollection ...> part in your
config.xml:
<scriptFile>FeatureCollection.js</scriptFile>
Let me know if that helps.
Kind regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600
Hi, all,
I guess I found the problem: the SRS setting.
The coordinates from the mouse click is in lat. and lon. units, but the SRS of
my shapefile is using is a projected coordinate systems, here 2289. Therefore
this query returns no feature.
I tried the WFS_getFeatureBBOX request using SRS 2289, and the returned GML
looks good.
Now the problem is how to convert the coordinates from mouse click to the one I
want on the fly?
Thanks!
Best,
Yanlin
hmm, if the request is a getFeatureInfo request it should be reprojecting for you. Is your data set up in geoserver with the correct SRS value?
Brent Owens
(The Open Planning Project)
Yanlin Weng wrote:
Hi, all,
I guess I found the problem: the SRS setting.
The coordinates from the mouse click is in lat. and lon. units, but the SRS of
my shapefile is using is a projected coordinate systems, here 2289. Therefore
this query returns no feature.
I tried the WFS_getFeatureBBOX request using SRS 2289, and the returned GML
looks good.
Now the problem is how to convert the coordinates from mouse click to the one I
want on the fly?
Thanks!
Best,
Yanlin