Templates Plugins Courses

MapBox plugin: marker icon not showing if SVG format

When adding a marker to a Mapbox map, I can upload a PNG to use as an icon and it works fine, but SVG uploads do not show on the map. There’s no error message or warning, just a missing marker. I have a lot of marker images in SVG because that’s the default format used in Mapbox. Is there any way to get SVG to work?

Hello, @thejames
Thank you for using our plugin.

We have tested the possibility to download the Markers in SVG format and all is working well.
Please find below the screenshot with our settings, which allowed to work with SVG file:

Please check that you have uploaded your markers to the database correctly and please use our screenshot to set up this feature.

Hope it will help you.
Best regards,

I should be more precise: the uploading of the SVG works fine, but SVG do not display on the actual map. See image below comparing SVG vs PNG. Can you confirm that the SVG you upload shows on your map?

Hello, @thejames
Thanks for your screenshots.

Allow me to recommend you the next steps to fix your issue:

  • Create a new DataType in your DB, which will be called “Markers” for example;

  • Please create all required fields for this type. For example please find my screenshot:

  • In the “App Data” section you can download images in SVG format:

  • After it, you choose the image from your DataBase ( which was added in SVG format). Due to the fact, that for DB is the image (even in a different format), you can see the required Marker on Map:

Please try these steps and let me know if it works in your case.
Best regards,

This method still does not show SVG. The Firefox logo you are testing with is not actually an SVG, it is a PNG. The name is “1024px-Firefox_Logo%2C_2017.svg.png”, so it’s just a PNG with the letters svg in the filename. Try to test it with a real .SVG and see if it still works.

I tried the dynamic method above with two Markers in the dataset. If both had PNG images, both images showed as icons correctly. If one had a PNG and the other had SVG, only the PNG icon appeared. If both had SVG, neither icon appeared.

Hello, @thejames

Unfortunately, the method presented is the only one possible for uploading images in SVG format.

Also, please note that the MapBox platform also uses the svg.png format. Please find the screenshot from the official documentation of the MapBox:

I kindly recommend you use the proposed earlier settings for uploading images in the required type.

Sorry for this inconvenience.