I grep'ed the whole module but can't find any other invocation to OpenLayers.Control.SelectFeature than for the popup and tooltip.
But SelectFeature is a must-have in a lot of situation.
Eg: you need to highlight some area, you need something like:

new OpenLayers.Control.SelectFeature(myLayer, {
	hover: true,
	highlightOnly: true,
	renderIntent: "temporary"
}

Even more important is selecting a feature:

new OpenLayers.Control.SelectFeature(myLayer, {
        multipleKey: "shiftKey",
        toggleKey: "ctrlKey",
	clickout: true
}

(+ properties around SelectFeatures like selectFeature.handlers.feature.stopDown)

My current use-case is to select among a geojson vector layer containing polygonal features, while geofield restrict me to "drawing" features.
Has a patch have yet to be written ? Can I be pointed to the issues talking about this subject ?
I think that the bare minimum would be a behavior with checkboxes to select layer and a big textarea for the raw javascript, it least the above control would become possible.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drzraf’s picture

let's try this.
It's a draft and the main problem is the inability to attach multiple SelectFeature to differents layers.
I'll need advises for this.

[edit] I know about the missing comma after "hover", but it's not the main point of the issue

zzolo’s picture

Status: Active » Needs work

Hi @drzaf. This sounds like a good idea and thanks for the "patch". I am still a bit confused on the exact use case, can you describe it a bit more.

There are a number of things wrong with this patch.

  • It's not a patch. Please see this for making a patch that includes new files: https://drupal.org/node/707484
  • For your options form, you are not using the correct types, like a select for values with finite possibilities.
  • You should add more description to the behavior, and to each option. See http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature-js...
  • I have not actually tried the patch, but in the JS, you are basically redefining everything, when you could just pass the options variable through to the Control.

I look forward to the new patch.

Pol’s picture

Any update on this ?

drzraf’s picture