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

[Question] How to install and use? #201

Closed
Steelhand opened this issue Sep 13, 2019 · 3 comments
Closed

[Question] How to install and use? #201

Steelhand opened this issue Sep 13, 2019 · 3 comments

Comments

@Steelhand
Copy link

How do you install this thing for a total newbie?

I managed to install node.js and npm, and do
npm install --save leaflet.geosearch
(with a few errors)

But what now? How can I use it? What language is this?
Typing this directly into the html code surely didn't work.
import { OpenStreetMapProvider } from 'leaflet-geosearch';

I was expecting something along the lines of:

<script src="leaflet-geosearch.js"></script>

Maybe this script is beyond my capacity?

@pierreloicq
Copy link

See #92

@pierreloicq
Copy link

There's something I don't understand: if npm is the "node package manager", and node was made to run js on server-side, it does not mean that code installed with npm is run exclusively on the server side ?
Thanks

@smeijer smeijer added this to the v3.0.0 milestone Apr 13, 2020
@smeijer smeijer added the docs label Apr 13, 2020
@smeijer
Copy link
Owner

smeijer commented May 23, 2020

Closing, as docs have been improved. I hope that answers most questions. If not, please let me know.

https://smeijer.github.io/leaflet-geosearch/

@pierreloicq , yes, npm is short for node package manager, but pretty much all javascript libraries, regardless of front or backend are hosted there.

Bower deprecated itself in favor of npm, and I don't know of any other serious alternatives either.

npm itself, is indeed not a browser tool. It runs on your system, and you'll probably want to combine it locally with a bundler. The result of bundling is just javascript though. So unless you're using specific non-browser api's (such as filesystem calls), it will run perfectly fine in the browser.

Anyway, if you don't want to use npm, it's still possible to load it from a can (unpkg.com)

@smeijer smeijer closed this as completed May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants