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

annotation-v9:2.0.1:SymbolOptions().withTextField("中文") only works with chinese?! #48

Open
alx696 opened this issue Sep 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@alx696
Copy link

alx696 commented Sep 20, 2023

version:

  • org.maplibre.gl:android-sdk:10.2.0
  • org.maplibre.gl:android-plugin-annotation-v9:2.0.1

Only chinese works, any other characters will not work. Why? Is my usage wrong?

Works:

Symbol symbol = symbolManager.create(
        new SymbolOptions()
                .withLatLng(
                        new LatLng(28.693, 101.30934)
                )
                .withTextField("中文")
);
symbolManager.update(symbol);

Not works:

Symbol symbol = symbolManager.create(
        new SymbolOptions()
                .withLatLng(
                        new LatLng(28.693, 101.30934)
                )
                .withTextField("中文hi") // hi, 中文123, 中-文 not work
);
symbolManager.update(symbol);

If any withTextField contains non-chinese , all Symbol can not show.

@alx696
Copy link
Author

alx696 commented Sep 20, 2023

The other problem: SymbolManager.setSymbolPlacement("line") not work.

I need to add label on line, but can not find any document. So i try to add Symbol with the point on line. But if set SymbolManager.setSymbolPlacement("line") , all Symbol can not show.

@louwers louwers added the bug Something isn't working label Sep 20, 2023
@alx696
Copy link
Author

alx696 commented Sep 21, 2023

@louwers through this issue maplibre/maplibre-native#869 , I found that the reason was text font not set. SymbolLayer have same problem.

Although the problem disappears after setting the font. This problem is still strange. It is recommended to use the system default font if no font is set.

If the problem cannot be solved for the time being, I hope there will be documentation explaining which options are required, or throw an exception if no required options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants