-
Notifications
You must be signed in to change notification settings - Fork 515
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
Symbols not rendered when textField property is specified #196
Comments
I also tried the Mapbox Maki Icons which I downloaded from: https://labs.mapbox.com/maki-icons/ |
Furthermore, adding the textField property to symbol options will also result in symbols not being rendered: This does not work;
This does work:
|
SVG support is a feature that was recently added to mapbox-gl-native -> mapbox/mapbox-gl-native#16030 and isn't yet availlable in a stable platform release.
How are you adding these to your project? Are you adding them to the assets folder so they can be picked up? In the example app we have
That is related to the default configuration of SymbolManager (eg. iconAllowOverlap etc). More context in #119 that would resolve this by exposing this as a configuration. |
I was able to convert the maki Icons to PNG files and successfully use them (even with transparency) as symbols. Anyway thanks a lot for your help! |
@jakubprogramming Actually text is supported and works for me, does it still not work when you use PNG icons? |
Hey @m0nac0, No unfortunately text is not working whatsoever. Does not matter whether I include a PNG or no icon. Do you think you could add a code snipped of your working symbolOptions? |
The most simple example working for me is just return SymbolOptions(
iconImage: iconPath,
geometry: LatLng(latitude, longitude),
textField: "test",
); |
Oh well, something must be messed up here then. For me this simple example does neither show a text nor an icon. When I remove the textField the icon is shown just fine. 😞 |
Hi, did anyone find a workaround, because I need to display the textField but the text is not rendered on map ? |
@m11an Are you using one of the mapbox default styles? Or are you using a custom stylestring? |
Hi, sorry for my late answer I found out that it was because of my custom stylestring it didn't load the fonts correctly. So I just load the default style from mapbox. @GULERTOLGA |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello, the same thing happens to me: "Symbols not rendered when textField property is specified". Has anyone managed to solve it as such? |
my symbol still does not show up when textField property is specified. Please guide me how to solve this. |
I am trying to add SVG or transparent PNG files as symbols onto the map.
For some reason I can only do this using png files without any transparency.
SVG icons won't work either.
The icons are simply not shown, no errors are given.
Is there a way to add transparent pngs or even better svgs as symbols to the map?
The text was updated successfully, but these errors were encountered: