Hello,
I was looking at the example a little more, and it appears that I the
javascript is having issues with the .getJSON function.:
$.getJSON(searchUrl, function(data) {
$.each(data.geonames, function() {
Geoserver is returning a valid JSON object, and I renamed data.geonames to
data.features. I don't have enough experience in JSON to know why
$.getJSON(searchUrl, function(data) is failing for geoServer outputs. If
anyone knows let me know.
Thanks
________________________________
From: David Winslow <[email protected]>
To: Mark Volz <[email protected]>
Cc: "[email protected]"
<[email protected]>
Sent: Monday, October 10, 2011 8:34 AM
Subject: Re: [Geoserver-users] Using Geoserver in openlayers JQuery Mobile
Example
You may need to tweak the OpenLayers example, but OpenLayers is indeed capable
of reading the GeoJSON output from GeoServer.
To filter the results in a WFS request you just need to include a FILTER
parameter with OGC Filter XML or a CQL_FILTER with, well, a CQL filter :)
There's info on this on http://docs.geoserver.org/ if you search a bit;
OpenLayers also has tools to help format WFS requests for you.
--
David Winslow
OpenGeo - http://opengeo.org/
On Mon, Oct 3, 2011 at 10:53 PM, Mark Volz <[email protected]> wrote:
Hello,
>
>
>The Openlayers JQuery Mobile uses geonames.org to produce geoJSON results
>that a user can then select and zoom to a feature. I noticed that GeoServer
>can produce output in geoJSON.
>
>
>Question 1) Does anyone know if the geoserver will work with the Openlayers
>Jquery Mobile example?
>
>
>Question 2) The format that geonames requires is
>"http://ws.geonames.org/searchJSON?featureClass=P&maxRows=10&name_startsWith=new
> york city." How would I need to modify Geoserver to search a particular
>layer or layers for data?
>
>
>Thanks
>------------------------------------------------------------------------------
>All the data continuously generated in your IT infrastructure contains a
>definitive record of customers, application performance, security
>threats, fraudulent activity and more. Splunk takes this data and makes
>sense of it. Business sense. IT sense. Common sense.
>http://p.sf.net/sfu/splunk-d2dcopy1
>_______________________________________________
>Geoserver-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users