Services Plugins FAQs

Map Default Icon on mapbox plugin

Friends…

How can we get the default icon to work for all items in a database? Here is my reason.

I have millions of items of a data type. Every single one of them would have the same icon. The icon field, although set to default to a specific icon, does not populate for any item I upload. So I need a way to have the default icon show for every item.

Why I can’t do this today:

  1. Mapbox plugin does not allow you to specify a default icon without specifying a list of icon sizes… if I’m not specifying a list of icons, why do I have to specify their size?
  2. I can’t set the size of the default icon.

Please help! Not only would this help a lot of people I believe, but it would also save me the WU cost of updating 18 million items.

Cheers,

Hello @thecheauxco,

Thank you for your message!

I’m looking into your query and will follow up with you shortly :pray:.

If you have any other questions in the meantime, please don’t hesitate to post them here, and I’ll respond as quickly as possible.

Best regards :sunflower:

Hello again @thecheauxco,

Upon further testing, it appears that the default marker icon IS used if you do not specify a list of icons. However, you will need to provide a list of icon sizes from your database since the icons can vary in size and the system requires information on how large each icon should be displayed.

Could you please try this setup and see how it works on your end? I would appreciate your feedback on this solution :pray:

Best regards :hibiscus:

@dorel the list of icon sizes is the issue i have.

If default an icon image, why not default an icon size?

I have a list of 18 million items. Do all of them need a field for icon size and the same icon size number?

Hello @thecheauxco,

I’ve been considering this as well. I will discuss it with the developer to see what options we have. I’ll get back to you as soon as possible with more information :pray:

If you have any questions in the meantime, please don’t hesitate to reach out to us at any time.

Best regards :sunflower:

Thanks @dorel this feature would help multiple apps of mine, a lot.

Hello @thecheauxco,

We’ll do our best :blush:. Could you please let me know the size of your icon in pixels? This information will be helpful for us.

Best regards :hibiscus:

@dorel

Ideally, the size of the default icon would be determined by a field where I can specify the size with a whole number as a percentage. 1 being 100%, .2 being 20%, 1.2 being 120%.

So the setup would look like adding 1 image as the icon and filling 1 field to determine the icon size.

Hello @thecheauxco,

That is precisely how the icon size feature operates. You can verify this by referring to the Mapbox documentation here.

We are currently evaluating the best approach to enhance this feature, and I will provide you with more information as soon as we have made a decision!

Best regards :sunflower:

I understand, @dorel. I use the icons and sizes features on other map implementations.

If it were up to me, just add a default size field like you have a default icon field and when the configuration does not have a list of icons or list of sizes, it uses the default.

Hello @thecheauxco,

Thank you for your patience. We are still looking into your request and will keep you updated with any new information as soon as it becomes available.

Best regards :hibiscus:

Hi @thecheauxco,

I hope you had a relaxing weekend! :pray:

We’re excited to announce that over the weekend, we released a new update for the Mapbox plugin—version 1.126.0. This update introduces a default mechanism for handling icon sizes directly through the code, eliminating the need for a separate ‘icon size’ field.

Here’s how it works: if the ‘icon size’ field is left blank, the plugin will automatically adjust the icon size based on the actual dimensions of the image files used. To achieve optimal results on the map, we recommend using images resized to 32px by 32px, however if you choose for the icons to be bigger on the map, bigger images will achieve that. This approach not only ensures uniformity but also optimizes WU usage by avoiding the need for high-resolution images for map icons. You can easily resize your images by using online tools like this one.

Please update the plugin to the latest version and give it a try. I look forward to your feedback to see how it works out for you!

If you have any questions or need further assistance, just let me know—I’m here to help!

Best regards, :sunflower: