|
From: Paweł P. <ppa...@gm...> - 2010-03-24 11:17:36
|
Nevermind, it was my mistake.
All you have to do is:
drawPathFeatureOptions.getJSObject().setProperty("multi", true);
W dniu 24 marca 2010 11:31 użytkownik Paweł Pawlak <ppa...@gm...>napisał:
> Hi!
>
> I am trying to add new object to database. I story my geometry as
> MULITLINESTRING so I have to change the *multi *options to *true*. In
> JavaScript it looks like this:
>
> *line: new OpenLayers.Control.DrawFeature(
> vecotrLayer, OpenLayers.Handler.Path,
> {handlerOptions: {multi: true}} *
>
> and it works!
>
> In Java my code looks like this:
> *
> DrawFeatureOptions drawPathFeatureOptions = new
> DrawFeatureOptions();
>
> HandlerOptions handlerOptions = new HandlerOptions(); //
> <----------- PROBLEM it does not work, there is no constructor!!!!!
> drawPathFeatureOptions.setHandlerOptions(handlerOptions) //
> <----------- PROBLEM
>
> PathHandler pathHandler = new PathHandler();
> drawLine = new DrawFeature(vectorLayer, pathHandler,
> drawPathFeatureOptions) ;*
>
>
> How to set the handlerOptions property multi to true if I can not even
> create this object?? Am I doing something wrong??
> Please help...
>
> Regards,
> Poul
>
|