Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Leaflet.js Essentials

You're reading from   Leaflet.js Essentials Create interactive, mobile-friendly mapping applications using the incredibly light yet powerful Leaflet.js platform.

Arrow left icon
Product type Paperback
Published in Aug 2014
Publisher
ISBN-13 9781783554812
Length 180 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Geocoding addresses in Leaflet


Geocoding is the process by which you can enter an address and be taken to a point on the map. Geocoding functionality is not part of the Esri-leaflet core but is a separate plugin. You can find more information on the esri-leaflet-geocoder GitHub page at https://github.com/Esri/esri-leaflet-geocoder.

Geocoding – from an address to a point

The geocoding plugin places a search box below the zoom control. As you type an address, the search autocompletes and presents the possible options. You can either type the whole address or select from the list when the one you want is available. Clicking on an option or pressing enter will put a marker on the map at the location and zoom into it. To create a map with geocoding functionality, follow these steps:

  1. Reference the CSS and JS files:

    <script src="http://cdn-geoweb.s3.amazonaws.com/esri- leaflet-geocoder/0.0.1-beta.3/esri-leaflet-geocoder.js"></script>
    <link rel="stylesheet" type="text/css" href="http...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image