Correct Url to image assets in Plugin

What product/components do you use and which version/fix level are you on?

Plugin developed on version 1016.0.128

Is your question related to the free trial, or to a production (customer) instance?

Customer instance

What are you trying to achieve? Please describe it in detail.

Url to css png asset from npm package leaflet extramarkers not found. (404 not Found)

Do you get any error messages? Please provide a full error message screenshot and log file.

GET http://localhost:9000/apps/img/markers_shadow.png 404 (Not Found)

Have you installed all the latest fixes for the products and systems you are using?

Yes

In what way do i have to configure the path to the image file provided by the npm package so that it can be fetched by the plugin.

css: (provided by npm package)
background: url(“…/img/markers_default.png”)

How does it work in the github repo: SoftwareAG/cumulocity-data-points-map-widget-plugin
In File: cumulocity-data-points-map-widget-plugin/widget/components/leaflet.extra-markers.css
Is it possible to have them fetched from the node module or do i have to put them into a new directory of the widget? Or do i have to configure webpack to have them included?

Cheers,
Jakob

1 Like

Hi Jakob,

In Data points Map plugin, we are rendering extra marker using svg. That means it is not going to use from css.
However, in another plugin called Smart Map Settings Widget Plugin, i faced similar issue with another leaflet plugin. I resolved that using gulp task.
You can find sample here

Regards,
Darpan

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.