Closed Zeni241 closed 6 years ago
hi @Zeni241 and thanks for using the library,
const geonames = new Geonames({ username: 'myusername', lan: 'en', encoding: 'JSON' });
did you actually register to http://www.geonames.org/login ? cause the username must be a real one and not the placeholder "myusername" that you are using now.
Thanks
Thanks for reply. Yes I did register and I can login to your site with this user name.
Sorry, just to understand exactly what's going on, did you add your username in the config object?
const geonames = new Geonames({ username: 'YOUR USERNAME', lan: 'en', encoding: 'JSON' });
Another thing to note, it's not clear how did you install the module itself, try to install it as a npm module.
npm install --save geonames.js
and then import it depending on your environment with:
import Geonames from 'geonames.js'; /* es module */
const Geonames = require('geonames.js'); /* umd */
Thanks
HI I am trying to use geonames.js in browser. I am on local machine and address in browser is http://localhost:57745/index.html Following is my code.
<script type="text/javascript" src="geonames.min.js"></script>
<button type="button" class="btn btn-primary" onclick="getCities()">getCities</button>
I am getting this error
This is my first time using this library. Any help please. Zeni