[OpenLayers-Users] Limit total Vector Layer points to be drawn

giraam sdjbm17 at gmail.com
Mon Jul 12 11:20:02 EDT 2010


Hi Andreas,

I change my OL include (it was local) and I'm including OL from 
http://www.openlayers.org/api/OpenLayers.js
http://www.openlayers.org/api/OpenLayers.js  and still the same problem.

I modified my code to something like this:

vectorLayer.events.register('beforefeatureadded', this, function(evt){
return false; });

This event is registered just after the vectorLayer is defined.

The DrawFeature Control is this: 

dibujarPunto = new OpenLayers.Control.DrawFeature(
    vectorLayer, OpenLayers.Handler.Point,{
        title: "Dibujar",
        multi: false
    });


I got the same result! After I click the point is not shown on the map (but
the feature is added because I check the vectorLayer.features.length with
Firebug and in fact is there), if I zoom in or out the point appears.

What else may I check! I really don't know if I'm doing something wrong or
what..!

Thanks again for your time,

Gilberto Ramos

-----
just another web developer
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Limit-total-Vector-Layer-points-to-be-drawn-tp5282918p5283348.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list