1

I have a large monolithic OL4 js/php system that I have hacked together in the last year, that has lots of raster and vector functionality driven by json parameter files.

I want to refactor/rewrite it using OL5 node.js/npm packages in the best way for future maintenance. I am very familiar with OpenLayers 4 and js/php, but am only starting to learn about node.js and npm packages. I have done the OL5 workshop, and am familiar with the tutorials and examples.

What do you recommend for my starting point for my new system in terms of packages, frameworks, standards? Is it the workshop, or an example? Any other advice?

0

I'm taking my first baby steps with JavaScript and node-js myself and one of the first things I tried was a "hello world (map)" ;-)

The official npm build is the ol package. That page includes info on how to package the code up for the front-end using WebPack or other build mechanisms.

There's a great example using webpack here, it supports OL5, it's nicely documented, and should get you a "hello world map" up and running quickly.

As for the PHP side of things, if you want to port your server-side APIs to JavaScript, look into Express. I'm from a Python / Flask / CherryPy background so this feels natural, you may prefer something else, the good news is that there's plenty of choice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.