Skip to content

Instantly share code, notes, and snippets.

@bartvde
Last active December 18, 2015 11:09
Show Gist options
  • Save bartvde/5773513 to your computer and use it in GitHub Desktop.
Save bartvde/5773513 to your computer and use it in GitHub Desktop.
// create a new attributes store
store = new GeoExt.data.FeatureStore({
fields: [
{name: 'geometry'},
{name: 'name', type: 'string'},
{name: 'type', type: 'string'}
],
proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.HTTP({
url: "http://demo.mapfish.org/mapfishsample/2.2/wsgi/pois",
format: new OpenLayers.Format.GeoJSON()
})
}),
autoLoad: true
});
// create a grid to display records from the store
grid = new gxp.grid.FeatureGrid({
title: "Feature Attributes",
store: store,
ignoreFields: ["geometry"],
map: map,
renderTo: "grid",
height: 300,
width: 350
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment