Giter Club home page Giter Club logo

maplibre-gl-geocoder's Introduction

Maplibre GL Geocoder

A geocoder control for maplibre-gl-js.

Usage

Usage with a module bundler

npm install --save @maplibre/maplibre-gl-geocoder
import MaplibreGeocoder from '@maplibre/maplibre-gl-geocoder';
import '@maplibre/maplibre-gl-geocoder/dist/maplibre-gl-geocoder.css';
...
// Functions should return Carmen GeoJSON https://github.com/mapbox/carmen/blob/master/carmen-geojson.md
// View config definitions in our [documentation](https://github.com/maplibre/maplibre-gl-geocoder/blob/master/API.md#setgeocoderapi)
var Geo = {
  forwardGeocode: async (config) => { /* definition here */ },
  reverseGeocode: async (config) => { /* definition here */ }, // optional reverse geocoding API
  getSuggestions: async (config) => { /* definition here */ } // optional suggestion API
};

// Pass in or define a geocoding API that matches the above
const geocoder = new MaplibreGeocoder(Geo, { mapboxgl: maplibregl });

Using without a Map

It is possible to use the plugin without it being placed as a control on a maplibre-gl map.

Deeper dive

API Documentation

See API.md for complete reference.

Contributing

See CONTRIBUTING.md.

Licence

ISC © MapLibre © Mapbox

maplibre-gl-geocoder's People

Contributors

tristen avatar andrewharvey avatar thaddmt avatar tmcw avatar dependabot[bot] avatar drewbo avatar katydecorah avatar cmtoomey avatar samanpwbb avatar wipfli avatar mapsam avatar adrianababakanian avatar amplifiyer avatar antony avatar mblomdahl avatar malwoodsantoro avatar jseppi avatar danswick avatar zavety avatar sethvincent avatar mzdraper avatar mapbox-danny avatar josh-major avatar arcanemachine avatar tretuna avatar sheridanvk avatar rafraser avatar orivelton avatar oliverbienert avatar dehghani-mehdi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.