Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji markers are not displayed on the map #1783

Closed
link2xt opened this issue Jan 30, 2021 · 7 comments · Fixed by #1792
Closed

Emoji markers are not displayed on the map #1783

link2xt opened this issue Jan 30, 2021 · 7 comments · Fixed by #1792
Assignees

Comments

@link2xt
Copy link
Contributor

link2xt commented Jan 30, 2021

One-letter markers are displayed directly (no need to click on the marker), but emojis don't.

Probably something is wrong with this length check and emojis length is not "1"? I tried replacing it with neq and 0, but then it stopped displaying any markers at all, even 1-letter english markers:

Expression textField = switchCase(eq(length(get(MARKER_CHAR)), 1), get(MARKER_CHAR),

It's fixed in the core (

Expression textField = switchCase(eq(length(get(MARKER_CHAR)), 1), get(MARKER_CHAR),
), and I have tested with python that markers are returned by the FFI just as well as letters.

@link2xt
Copy link
Contributor Author

link2xt commented Jan 31, 2021

Maybe the problem is with the fonts, emojis are not rendered even in the black font below the marker:
image_2021-01-31_01-21-44

Maybe related issue: nitaliano/react-native-mapbox-gl#1407

@link2xt
Copy link
Contributor Author

link2xt commented Jan 31, 2021

I have tried to do something similar to https://docs.mapbox.com/android/maps/examples/text-field-formatting/ by adding:

import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.textFont;
...
private static final String[] textFonts = new String[] {"Roboto Black", "Arial Unicode MS Regular", "emojiOne"};
...
                 textAllowOverlap(true),
+                textFont(textFonts),
                 textIgnorePlacement(true)

but nothing changed.

Not sure if emojiOne is available anywhere or should be uploaded to mapbox account.

@link2xt
Copy link
Contributor Author

link2xt commented Jan 31, 2021

As a workaround it should be possible to extract corresponding image from our emoji picker and place them on the map as images.

Or maybe actually replace mapbox with OSM: https://github.com/osmdroid/osmdroid/wiki/How-to-use-the-osmdroid-library

https://support.delta.chat/t/switch-from-mapbox-to-osmdroid-on-android/1124

@link2xt link2xt added the bug label Jan 31, 2021
@link2xt
Copy link
Contributor Author

link2xt commented Jan 31, 2021

Here is the commit which added single-character markers for reference: f5cc757

@cyBerta
Copy link
Contributor

cyBerta commented Feb 1, 2021

some links which might show the way to go:
mapbox/mapbox-gl-native#15937
mapbox/mapbox-gl-native-android#324

@link2xt
Copy link
Contributor Author

link2xt commented Feb 2, 2021

On Desktop emojis are already displayed correctly with the latest core (master branch).

@link2xt
Copy link
Contributor Author

link2xt commented Feb 11, 2021

PR with a fix: #1792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants