Hello,

I am still having issues with getting the Openlayers JQuery Mobile example to 
work with Geoserver.  I am able to get geoserver to filter results however, 
because the JSON format for geonames is different than geoserver, I am unable 
to get mobile-jq.js to read the results from geoserver.  Specifically when I am 
using an input from geoserver, the following line in mobile-jq.js does nothing.

            $.getJSON(searchUrl, function(data) {


Javascript will skip the entire code block.  When I manually enter the path for 
searchUrl into a browser geoserver will return valid geoJSON.  


The main difference that I noticed between geonames geoJSON and geoserver is 
that geonames reports back only a list of data while geoserver reports back the 
data as features in a list with the coordinates represented within its own 
block [] within that list.  Also geoserver includes the coordinate system data, 
which could be tripping up the getJSON function


Has anyone had any success with the openlayers mobile-jq example?  

If not does anyone know how to get Jquery to read geoservers geoJSON? 


Thank You






________________________________
From: David Winslow <dwins...@opengeo.org>
To: Mark Volz <volzm...@yahoo.com>
Cc: "geoserver-users@lists.sourceforge.net" 
<geoserver-users@lists.sourceforge.net>
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 <volzm...@yahoo.com> 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
>Geoserver-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to