File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -39,16 +39,21 @@ Parameters that can be used (can be passed to the app server as GET query params
3939
40401 . This library is published in npm you can use it as an npm module
4141
42- ```
43- -shell-
44- npm install osm-static-maps
45-
46- -index.js-
47- osmsm = require('osm-static-maps');
48- osmsm({geojson: geojson})
49- .then(function(imageBinaryBuffer) { ... })
50- .catch(function(error) { ... })
51- ```
42+ ``` bash
43+ npm install osm-static-maps
44+ ```
45+
46+ ` ` ` javascript
47+ // index.js old school
48+ osmsm = require(' osm-static-maps' );
49+ osmsm({geojson: geojson})
50+ .then(function(imageBinaryBuffer) { ... })
51+ .catch(function(error) { ... })
52+
53+ // index.js modern style (also supports typescript)
54+ import osmsm from ' osm-static-maps'
55+ const imageBinaryBuffer = await osmsm({geojson})
56+ ` ` `
5257
53582. alternatively you can download the code, run the sample server and use it standalone (see How to run)
5459
You can’t perform that action at this time.
0 commit comments