freemap-v3-react
freemap-v3-react copied to clipboard
Freemap Slovakia web application (www.freemap.sk)
Freemap Slovakia Web Application
Current version of www.freemap.sk maintained by OZ Freemap Slovakia.
Requirements
- Node 14
- Freemap API Server
Compiling and running in development mode
-
Add
local.freemap.sk
to127.0.0.1
in your system hosts file (for Linux and MacOS it is/etc/hosts
). -
Install the necessary libs:
npm i npm run prepare
-
Run webserver which also compiles the source files on change:
npm start
-
Install development CA certificate to your browser.
-
Open the application by visiting
https://local.freemap.sk:9000/
.
Compiling for the production
Set DEPLOYMENT
to:
-
dev
(default) forlocal.freemap.sk
-
next
fornext.freemap.sk
-
www
forwww.freemap.sk
npm i
DEPLOYMENT=www ./node_modules/.bin/webpack
You'll then find all static web resources in dist
directory.
Other env varialbes
-
FM_MAPSERVER_URL
- base URL of Mapnik Mapserver (without trailing slash); for examplehttp://localhost:4000
for development
Translation (i18n)
Files:
-
webpack.config.js - texts in
htmlPluginProps
- src/translations/en-shared.json
- src/translations/en.tsx
- src/components/supportUsModal/translations/en.tsx
- src/globalErrorHandler.ts - bottom error message
- src/osm/osmTagToNameMapping-en.ts
- https://github.com/FreemapSlovakia/freemap-mapnik/blob/develop/legend.js