1.0.5 • Published 6 years ago
ows-base-url v1.0.5
ows-base-url
Determines a correct wms/wfs base url from user input.
Getting started
Node.js:
npm install ows-base-url
let baseUrl = require('ows-base-url');
let url = baseUrl('ttp://www.example.com/wms?param1=value1&REQUEST=GetMap');
console.log(url); // -> http://www.example.com/wms?param1=value1&
Browser:
<script src="https://geofreak.github.io/ows-base-url/dist/baseUrl.min.js"></script>
<script>
let url = baseUrl('ttp://www.example.com/wms?param1=value1&REQUEST=GetMap');
alert(url); // -> http://www.example.com/wms?param1=value1&
</script>
Development
Install:
git clone https://github.com/geofreak/ows-base-url
cd ows-base-url
npm install --dev
Build dist\baseUrl.min.js for browser:
npm run build
Run browser demo at http://localhost:9090/:
npm run demo
Run tests:
npm test
License
MIT