[MapQuery] Re: OpenLayers.Layer.Vector.RootContainer
Volker Mische
volker.mische at gmail.com
Sun May 20 13:10:26 EDT 2012
Hi Giuseppe,
On 05/19/2012 06:56 PM, Giuseppe De Marco wrote:
> I don't understand yet why mq create a RootContainer when I create a new
> mq layer.
It creates a RootContain, as MapQuery automatically adds an
OpenLayers.Control.SelectFeature control, which in returns adds the
RootContainer layer
> If I create a feature inside a vector layer the newcoming mq layer, that
> carries the rootcointainder by default, doesn't permit to me to do
> getfeatures on the features !
>
> So the features remains unclickables !
How do you create the new feature? Through the MapQuery API with
layer.features(your-new-feature-as-geojosn)?
> Volker why mq create a rootcontainer also when a mq wms layer was
> instanciated ?
Because of the SelectFeature control. This could indeed be optimized to
only create that control if there is a vector layer initiated.
> and why if I destroy the rootcontainer i got this:
You shouldn't destroy things that were automatically created :)
Cheers,
Volker
More information about the MapQuery
mailing list