banner



How To Get Rid Of Blue Dots On Camera

I am working on a digitizing tool.

There are iv buttons as of now:

  • add point
  • add line
  • add polygon
  • remove geometry

The user always starts past first drawing some geometries. I am using the Draw interaction (ol.interaction.Depict) and the geometries are added to a Collection (ol.Collection).

So far then skillful. Now the user might decide to remove some of the drawn geometries by clicking on them.

Here is an example:

enter image description here

When clicked on the 'remove geometry' push, then:

  • drawing is removed to deactivate it
  • a Select interaction is created (ol.interaction.Select) to select the geometry to remove it
  • when a feature is selected its ID is compared to all other features' IDs in a loop, and one time the correct ID is institute that feature is removed.

The logic works, but it is extremely hard to delete a point or a line because of the blue dot that is shown when hovering, which makes it almost impossible to click the geometries.

For example:

The following yellow signal would non be removed as the blueish dot is in the way:

enter image description here

If I move the cursor a little fleck below the dot the feature volition be removed:

enter image description here

The line is most impossible to remove as the blueish dot volition motion with the cursor as the cursor moves along the line:

enter image description here

For the polygon it works fine, every bit the blue dot is only shown when hovering around the edge of the geometry, just if you ignore that and click anywhere within the fill, the geometry will be removed likewise:

enter image description here

How can I alter the appearance of that blueish dot? I would be OK with discarding it entirely. I have tried to add together a way to the Select Interaction just that does non accept whatever upshot. It volition just add another fashion on top of the blue dot.

EDIT: a way to solve this, perhaps, would be to await through that blueish dot. Is there a style to click/select and see what is behind the blue dot?

Source: https://gis.stackexchange.com/questions/218881/openlayers-3-getting-rid-of-blue-dot-selection-icon

Posted by: sanderscoad1958.blogspot.com

0 Response to "How To Get Rid Of Blue Dots On Camera"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel