[OpenLayers-Users] Symbology
Brad Bordine
b.bordine at decapower.org
Wed Aug 21 13:15:00 PDT 2013
I am trying to use the dot density library from the openlayers symbology
but I am running up against the reality that I do not understand how to
call vector features properly. The postgres-served shape file I am
calling has zip code geometry as well as numerous data cells, of which I
need to access only one. I have looked at as many vector tutorials as I
can find but nothing has made it easier for me to create a vector layer
with all zipcodes and associated table rows. Obviously that is because I
do not understand how to call the "features" from the data rows or the
"features" which are the polygon objects... here is my call as it stands
at the moment. I just tried adding an empty features set for fun, the
same code failed without that line... Thanks in advance.
var zipPen = new OpenLayers.Layer.Vector("ZipPen", {
strategies: [new OpenLayers.Strategy.BBOX(bbox)],
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "/geoserver/wfs",
featureType: "SPOOL_ZIP_July_1_13_test",
geometryName: "the_geom",
geometryType: "Polygon",
featureNS: "maps.decapower.org/Spool",
features: [],
srsName: "EPSG:4236"
})});
map.addLayer(zipPen);
var zipDensityLayer = new ol.thematic.DotDensity( map, {
layer : 'ZipPen',
indicator : 'NMPLTXZ_1',
dotValue : 25,
defaultSymbolizer : { 'pointRadius' : 1,
'fillOpacity' : 1, 'fillColor' : '#ffffff', 'strokeWidth' : 0 }
});
More information about the Users
mailing list