openlayers / openlayers/openlayers

Style Array - Overlapping Marker Styles

Open
#13,855 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 17h
Merged PRs (30d)
21

Description

Hi,

currently I am styling my markers using a style array, containing two style objects (the marker itself and an icon).
Depending on the zoom level it happens, that my markers overlap on the map and when this happens, I get the problem as shown in the following screenshot:
ol_marker_zlayer

The green marker sticks in between the white marker and the white marker's plane icon.
How can I avoid that another marker gets drawn in between the styles of a single marker? I assume that manually adjusting the z-layer for each style gets complicated, because it is a problem between different markers.
Any ideas?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides no source file, test, or entry point. Reproduce the overlapping two-style markers at different zoom levels using the style array described, then trace the marker rendering order. Done means styles belonging to one marker no longer have another marker rendered between them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.