Using mapstore in complete offline environment

190 views
Skip to first unread message
Assigned to offth...@gmail.com by me

Michael Steigemann

unread,
May 12, 2021, 12:15:25 AM5/12/21
to mapstore-developers
Hello MapStore Developers!
I have to build a mapstore application that is working in a complete offline environment. What do I need to take care of?

At least  I think I need to bundle all the external links / styles / libraries into the war file. For example:

Concerning this I have two questions:

1.  What is the best way to find and download all the dependencies (incl. fontawesome)? 

2. How / where to integrate them into the war file?
One option for integration would be for example to put them into a subdirectory of the product\assets folder. I have already tried this with the favicon.ico. Or is the libs folder the right place (like the cesium-navigation subfolder)?

Thanks for your feedback and all the best,
Michael

Lorenzo Natali

unread,
May 17, 2021, 4:33:44 AM5/17/21
to mapstore-developers
Hi,
1. I don't think there is a best way to download them. You can save them in your project or during your install, build process.
2. There is no explicit preference. If you don't want to change anything, I suggest to use assets directory that are copied in block into the final war file, while from the libs folder the build process of a project, by default, copies only "cesium-navigation" sub-folder by default (so you may need to add a sub-folder to pom.xml)

Michael Steigemann

unread,
Jun 4, 2021, 1:02:43 AM6/4/21
to mapstore-developers
Hello Lorenzo!

Thank you very much for your support. I did the integration in the last days and it seems to work :-). First I tried to put the libraries into the assets folder but the where not packed into the war file. Therefore I integrated them into the libs folder and changed the pom.xml. This worked smoothly.

I have one additional question. So far I did not touch twitter-widgets and the google maps api. Do the following console logs have any impact in the "normal" usage of MapStore (all my data is hosted on a local geoserver):

 2021-06-04 06_58_19-Greenshot Editor.png
Thanks for your short answer and all the best,
Michael

Lorenzo Natali

unread,
Jun 8, 2021, 3:47:05 AM6/8/21
to mapstore-developers
Hi,
For twitter, the APIs are used by the plugins "MailingLists" and "Share". If you are not using them, you can remove them from "plugins.js", so they will not be included.

For Google API, you can try to remove from your index.html the script tag.
Let us know if this works.

Michael Steigemann

unread,
Jun 9, 2021, 2:46:45 AM6/9/21
to mapstore-developers
Hello Lorenzo!

Thanks for your answer. Removing  <script src="https://maps.google.com/maps/api/js?v=3"></script> worked. 

After removing  "MailingLists" and "Share" from the plugins.js the widget.js call at twitter was still called even if it is not used. I then searched the sourcecode and tried to comment out the following line in the jsx-File:

2021-06-09 08_43_51-Window.png

After rebuilding the application everything seems to work smoothly.  Can I leave it like this or do you think there might be any side effects?

Thanks again and all the best,
Michael
Reply all
Reply to author
Forward
Message has been deleted
0 new messages