Comments (4)
Hi @bricepollock, thank you for writing in, by default PointAnnotationManager
allows are icons and texts to be overlapping, this explains why you disable both textAllowOverlap
and iconAllowOverlap
but the annotations are still overlapping.
You can take a look at Label collision and let us know if it helps you achieve what you want. Additionally you can enable map's debugOptions
as shown below to see how the annotations are overlapping
mapView.debugOptions = [.collision]
from mapbox-maps-ios.
My goal was to have text hidden when overlapping any part of another PointAnnotation, but always show the image.
@bricepollock Try this configuration:
manager.textAllowOverlap = false
manager.iconAllowOverlap = true
manager.textIgnorePlacement = false
manager.iconIgnorePlacement = false
manager.textOptional = true
from mapbox-maps-ios.
@persidskiy this is much closer to what I was going for, thank you! It wasn't clear that the placement
properties were important since the Label Collision appeared to only reference map-elements as 'other symbols' in placement
description.
Your config provided hidden text if it collides with other text. However, ideally, I want the text to be hidden whether it collides with either icon or text (like how MapKit works). Turning on iconAllowOverlap
hides annotations for icon-collisions, which isn't the optionalText
behavior I'm looking for. Avoiding overlaps would result in a lot cleaner map. Is there a way to configure 'hide text if collides with icon or text' or a mechanism to manage collision-hiding behavior for PointAnnotations
manually?
from mapbox-maps-ios.
@persidskiy @maios would love any more details on collisions if you have some
from mapbox-maps-ios.
Related Issues (20)
- ModelLayer disappears abruptly on panning when pitch is applied HOT 7
- Mapbox assert at start HOT 6
- Migration guide missing alternative for dragStart() and dragEnd() HOT 2
- invalid archive returned from 'https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/24.3.0-beta.1/MapboxCommon.zip' which is required by binary target 'MapboxCommon' HOT 5
- Support for transition for data-driven properties HOT 1
- SwiftuI HOT 1
- Crash in mapbox::common::platform::taskScope() -> EXC_BAD_ACCESS 0x0000000000000009 #250
- Stop using custom wrappers for existing iOS features. HOT 1
- How to Load Custom Fonts Locally HOT 1
- Local font Chinese does not take effect
- Jerky Movement of ViewAnnotation HOT 4
- Adding system UIImages to map gives `mismatched image size` HOT 1
- MapboxMap and Snapshotter camera(for:padding:bearing:pitch:) methods don't set padding HOT 3
- Pure SwiftUI Map Snapshot Capabilities HOT 3
- Mapbox Maps SDK crashes with Symbol layer! HOT 1
- Crash when loading glb model files via addStyleModel HOT 5
- App freezes when clicking the attributionButton on iOS 17.4.1 HOT 1
- iOS: camera.zoom calculates smaller zoom for camera(for:) initially HOT 4
- FollowPuckViewportState suffers a visual delay when target zoom level is equal to the current zoom level of the map HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-maps-ios.