[OpenLayers-Users] seeking more degrees of freedom when modifying rectangle feature

Eric Lemoine eric.lemoine at camptocamp.com
Tue Jun 2 02:26:55 EDT 2009


On Tuesday, May 26, 2009,  <stephane.poirier at usherbrooke.ca> wrote:
>
>
>
>
>
>
>
> Hi All,
>
> To modify a feature, I currently use the
> drawcontrols code here below. When I have rectangle feature, I would like to
> have more flexibility when resizing (i.e. proportions not conserved). Do I have
> to switch to another type of feature to have more dregree of freedom when
> modifying the feature?

Using the modify feature control's default mode (RESHAPE) should give
you what you want, no? (what tool do you use to draw rectangles? You
should use a DrawFeature control with a RegularPolygon handler)

Cheers,

>
> drawControls =
>
> {
>    modify: new
> OpenLayers.Control.ModifyFeature(rectangleLayer,
>
> {'displayClass': 'olControlModifyFeature', onModification:
> rectangle_feature_modified,
>     mode:
> //OpenLayers.Control.ModifyFeature.RESHAPE
> |
>
>   OpenLayers.Control.ModifyFeature.DRAG
> |
>
>   OpenLayers.Control.ModifyFeature.RESIZE})
>
> };
>
> Regards,
>
>
> Stéphane Poirier
> Professionel de recherche au
> CARTEL
> Centre d'Applications et de Recherches en Télédétection
> Département
> de géomatique appliquée
> Université de Sherbrooke
> Sherbrooke (Québec),
> CANADA J1K 2R1
> Tel.: (+1 819) 821 8000 #61904
> Fax.: (+1 819) 821
> 7944
> Stephane.Poirier at USherbrooke.ca
> http://www.usherbrooke.ca/cartel
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list