Leaflet geosearch (include 3.party js package)

I wan’t a map, where you get the address, when clicked on it. I also need the other way around, to get the latitude and longitude when the user writes an address.

I am using bevanhunt:leaflet with openstreetmap tiles. Now my question is: I can’t find leaflet geolocation/geosearch as a package on atmospherejs.com. I did find a javascript package: https://github.com/smeijer/L.GeoSearch which does what I want.

But how do I import it into my meteor project?
As I see in the code, some must be on the server (http request) and some on the client.

i’ve used something similar in a recent project and use the following method:


//vendor imports
import                                          '../../vendor/geoSearch/js/l.control.geosearch.js';
import                                          '../../vendor/geoSearch/js/l.geosearch.provider.openstreetmap.js';

for creating a search provider

//OpenStreetMapProvider
const osmProvider = new L.GeoSearch.Provider.OpenStreetMap();

defining the leaflet container


 //initializes the map using MapBox
    initializeMap_MapBox() {
      mymap = L.map('mapid');

}

in the render function

<div id="mapid"></div>