[OpenLayers-Users] Insert single point
Imran Rajjad
rajjad at gmail.com
Mon Feb 21 05:39:54 EST 2011
Hi,
did you try changing new OpenLayers.Geometry.MultiPoint to new
OpenLayers.Geometry.Point???
regards,
Imran
On Mon, Feb 21, 2011 at 3:28 PM, snuffer892 <paolo_tome at hotmail.com> wrote:
>
> Hello everyone,
> I have a stupid problem. In a wfs layer I have this code to insert points:
>
> var drawPoint = new OpenLayers.Control.DrawFeature(
> puntifilter, OpenLayers.Handler.Point,
> {
> title: "Inserisci Punto",
> displayClass: 'olControlDrawFeaturePoint'}
> );
> drawPoint.featureAdded = function(feature) {
> feature.layer.eraseFeatures([feature]);
> // cast to multipoint
> feature.geometry = new OpenLayers.Geometry.MultiPoint(
> feature.geometry
> );
> feature.style.strokeColor = "#0000ff";
> feature.state = OpenLayers.State.INSERT;
> feature.layer.drawFeature(feature);
> }
>
> how can I change so users can enter only one point at time? single point
> option exists?
> Thanks a lot,
> Paolo
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Insert-single-point-tp6048189p6048189.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
--
I.R
More information about the Users
mailing list