Path to Icons directory

122 views
Skip to first unread message
Assigned to stefan...@geosolutionsgroup.com by lorenzo...@geosolutionsgroup.com

Pat Lachute

unread,
Jul 6, 2023, 1:36:59 PM7/6/23
to mapstore-users
Hi,
I can't find the directory as well as the way to integrate icons that are on my server, but no problem with a web url. I'm on GeoNode 4 in docker. Which geonode-static directory, and which path. I saw in a tutorial fill: url('file://flags/icon.svg), in another "symbolUrl": "data:image/svg...", but in both cases I don't know root, and I'm in SLD. I also saw that it could be in uploads (geonode_static/_data/uploads), but same thing when I write file://uploads/star.svg for example. An idea ?

icon_mapstore.PNG

Stefano Bovio

unread,
Aug 7, 2023, 5:48:43 AM8/7/23
to mapstor...@googlegroups.com
  Hi,
GeoNode static files are usually located under the /static/ path and the mapstore files configuration are at /static/mapstore/.
In the screenshot it seems you are trying to render the star.svg files included by default in the mapstore configuration, this symbol is located at the /static/mapstore/symbols/star.svg path.
Note: the icon symbolizer UI has been implemented to work with external graphics mainly and not for relative or local urls yet
I did two tests:

1) Using the relative url /static/mapstore/symbols/star.svg the icon symbolizer UI is showing the star correctly but the GeoServer behind is not able to apply the image as style to the layer and instead shows a grey box.

2023-08-07 11_35_35-Window.png

2) Using instead the absolute url of the symbol https://stable.demo.geonode.org/static/mapstore/symbols/star.svg the icon symbolizer and the layer are rendered correctly with the star image.

image.png

So you need to follow the second test and use the absolute url to your GeoNode static graphics folder.

Hope this helps,
Stefano


--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/532f44ac-eef0-4713-95cb-141ff48aeb4fn%40googlegroups.com.


--

Regards,

Stefano Bovio

==

GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

==

Stefano Bovio

Frontend Software Engineer


GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  333 8128928


https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Pat Lachute

unread,
Aug 8, 2023, 10:05:47 AM8/8/23
to mapstore-users
Thanks for your help Stefano,

I tried on my side, but even with the absolute path I still see the big gray square, although I see it in the icon symbolizer UI. Any idea why? There I use a github directory to deposit my svg and png icons, but it seems to me that it would be more practical if it were local.

Stefano Bovio

unread,
Aug 22, 2023, 3:55:14 AM8/22/23
to mapstor...@googlegroups.com
I tried on my side, but even with the absolute path I still see the big gray square, although I see it in the icon symbolizer UI. Any idea why? There I use a github directory to deposit my svg and png icons, but it seems to me that it would be more practical if it were local.

If I understood correctly you are storing the svg and png on github and then accessing as raw.githubusercontent?

I tried the following:

- access the icon on the geonode-mapstore-client repository https://github.com/GeoNode/geonode-mapstore-client/blob/master/geonode_mapstore_client/static/mapstore/symbols/map-pin-marked.svg
image.png
- add the raw.githubusercontent link inside the Icon symbolizer of a dataset on https://stable.demo.geonode.org/ and the icon is working

image.png

Could you try these steps on your GeoNode installation?

Hope this helps,
Stefano




Reply all
Reply to author
Forward
0 new messages