[Users] Can I use a Shapefile as an Ext.js chart store?
Tim Welch
tim.j.welch at gmail.com
Sun Oct 10 03:05:04 CEST 2010
Hey Robert, I haven't done this with GeoServer specifically but all signs
point to yes. The general idea is to get your client to request the data
from Geoserver, load the result into an Ext data store, then pass that store
to the Ext chart.
Here's info (might be a little dated) on hitting a geoserver wfs interface
and returning GeoJSON:
http://geoserver.org/display/GEOSDOC/GeoJSON+Output+Format
Here's some info on using a GeoExt FeatureStore to request the data and
automagically parse the geojson result and load the store:
http://api.geoext.org/1.0/examples/feature-grid.html.
That example uses a regular HTTP Get request and expects a geojson result.
Maybe you can do this with the geoserver rest api but here's an example of
using an OpenLayers wfs protocol instance:
http://workshops.opengeo.org/stack-intro/openlayers.html. Specifically this
piece:
protocol: new OpenLayers.Protocol.WFS({
url: "http://localhost:8080/geoserver/wfs",
featureType: "school_pt",
featureNS: "http://postgis.org",
srsName: "EPSG:900913",
version: "1.1.0"
})
Hope this helps, Tim
Tim Welch
Senior Developer, Ecotrust
On Sat, Oct 9, 2010 at 3:54 AM, Robert Buckley <robertdbuckley at yahoo.com>wrote:
> Hi,
>
>
> I was just wondering (before trying it out) if it is possible to use a
> field
> from a shapefile to provide the row data in an ext-chart.
> I would like to display the name of a area against its' population, both of
> which are present in a shapefile contained in a store in geoserver.
> Is this possible?..if not...in which format should data be in to be
> visualized
> in charts?
>
> Yours,
>
> Robert Buckley
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101009/fb053deb/attachment.html
More information about the Users
mailing list