[OpenLayers-Users] Vector layer -> drawFeature
ontwerp at limotec.be
ontwerp at limotec.be
Thu Jul 19 06:05:53 PDT 2012
Hello
I have a map with 2 layers. The base layer is an XYZ layer and a vector layer for the features.
This is the constuctor of the vector layer:
var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
markers = new OpenLayers.Layer.Vector("Markers",
{
styleMap: new OpenLayers.StyleMap({
externalGraphic: '@Url.Content("~/Images/Icons/Optical.png")',
graphicOpacity: 1.0,
graphicWidth: 30,
graphicHeight: 30,
graphicYOffset: -15,
graphicXOffset: -15
}),
renderOptions: { yOrdering: true },
renderers: renderer
}
);
map.addLayer(markers);
After I add a feature it won’t draw on the map. I get this error: feature.geometry.getBounds is not a function
The error occures in the drawFeature function.
How can I solve it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120719/e0e56402/attachment-0001.html>
More information about the Users
mailing list