Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osme.geoJSON is not a function #16

Open
akumidv opened this issue Jul 6, 2019 · 2 comments
Open

osme.geoJSON is not a function #16

akumidv opened this issue Jul 6, 2019 · 2 comments

Comments

@akumidv
Copy link

akumidv commented Jul 6, 2019

I try to execute an example, but it gives an error

osme=require('osme'); osme.geoJSON('FR').then( geojson => osme.toGoogle(geojson).add(map));
                                    ^
TypeError: osme.geoJSON is not a function
@akumidv
Copy link
Author

akumidv commented Jul 6, 2019

Version osme@1.3.0
Check under node v8.16 and node v.10.15

$>node -e "osme=require('osme'); console.log(osme);"
{ default:
   { setHost: [Function: setHost],
...
     geoJSON: [Function: geoJSON],

$>node -e "osme=require('osme'); console.log(osme.geoJSON);"
undefined

$>node -e "osme=require('osme'); console.log(osme.default.geoJSON);"
[Function: geoJSON]

@theKashey
Copy link
Contributor

I reckon - osme.default, as long as it’s es6 default export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants