123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <!DOCTYPE html>
- <html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta name="generator" content="Hugo 0.92.0" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="/assets/css/theme.css">
- <link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
- <script type="text/javascript" src="//use.typekit.net/iwm5axp.js"></script>
- <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
- <title>Geocoding Services - Pleasant Programmer</title>
- </head>
- <body>
- <header id="header" role="banner">
- <div id="thomas">
- <img src="/assets/img/thomas.gif" alt="DJ THOMAS IN DA HAUS">
- <img src="/assets/img/thomas.png" alt="Pleasant Programmer">
- </div>
- <h1 class="site-title"><a href="/">Pleasant Programmer</a></h1>
- <nav id="menu" role="navigation">
- <ul>
- <li><a href="/pages/projects.html">projects</a></li>
- <li><a href="/posts.html">archives</a></li>
- <li><a href="/tags.html">tags</a></li>
- <li><a href="/rss.xml">rss</a></li>
- </ul>
- </nav>
- </header>
- <div id="container">
- <main id="content" role="main">
- <article itemscope itemtype="http://schema.org/BlogPosting">
- <h1 class="p-name entry-title" itemprop="headline name">
- <a href="/posts/geocoding-services.html">Geocoding Services</a></h1>
- <small>
- <span class="dateline">Posted: <time itemprop="datePublished" datetime="2013-09-25">2013-09-25</time></span>
- | More posts about
-
- <a class="tag p-category" href="/tags/philippine-transit-app.html" rel="tag">
- philippine-transit-app
- </a>
-
- <a class="tag p-category" href="/tags/programming.html" rel="tag">
- programming
- </a>
-
- </small>
- <div class="e-content entry-content" itemprop="entry-text">
- <p>A key component for any routing service is being able to do geocoding. Most people who are looking for routes most probably don’t know exactly where their start and end points are on the map. Even then, manually looking for a location on a map is a time-consuming task.</p>
- <p>The gold standard for doing geocoding right now is Google Maps. It’s hard to find a better location search experience. If they actually provided routing for jeeps here in the Philippines, I imagine there wouldn’t be <em>that</em> much you could do for the competition.</p>
- <p>When the competition started though, I took it as a challenge to avoid Google Maps as much as possible. I wanted to see how much is currently possible with other options such as OpenStreetMap. In fact, OSM does have a geocoding service called <a href="http://nominatim.openstreetmap.org">Nominatim</a>.</p>
- <p>Sadly, for a mapping app, what you want to do is not simply just geocoding. With geocoding, you take an address and turn it into coordinates. When you want to search for a place in a mapping app, you take part of an address, infer the rest of it, and give the user options to choose from.</p>
- <p>Given a typical mapping app, you might type in “ateneo” and expect it to give you Ateneo de Manila University. With typical geocoding services like Nominatim or even Google’s <a href="https://developers.google.com/maps/documentation/javascript/geocoding">geocoding API</a>, you probably won’t get any result for this. What you want to use is the <a href="https://developers.google.com/maps/documentation/javascript/places">Places API</a> which provides an autocomplete search box. Using it, when you type in “ateneo”, it automatically suggests in the dropdown, “Ateneo de Manila University”.</p>
- <p>A downside to using the Places API is that it’s against the terms of service to use it with something that isn’t Google Maps, which means no OpenStreetMap. If there were more time, writing your own autocompletion engine using OpenStreetMap’s data will probably be a better long term solution.</p>
- <p>For now, since the competition’s deadline is just a few days away, I’ll be using Google Maps.</p>
- </div>
- <aside class="postpromonav">
- <nav>
- <ul class="pager clearfix">
-
- <li class="previous">
- <a href="/posts/jeep-and-bus-schedules.html" rel="prev" title="Jeep and Bus Schedules">← Previous post</a>
- </li>
-
-
- <li class="next">
- <a href="/posts/console-keymap-switching.html" rel="next" title="Console Keymap Switching">Next post →</a>
- </li>
-
- </ul>
- </nav>
- </aside>
- <section class="comments">
- <script
- data-isso="https://isso.pleasantprogrammer.com/"
- data-isso-require-author="true"
- data-isso-vote="false"
- src="https://isso.pleasantprogrammer.com/js/embed.min.js">
- </script>
- <section id="isso-thread"></section>
- </section>
- </article>
- </main>
- <footer id="footer" role="contentinfo">
- <p>
- <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">
- <img alt="CC-BY-SA" style="border-width:0" src="https://licensebuttons.net/l/by-sa/3.0/80x15.png">
- </a> © 2022 Thomas Dy - Powered by <a href="http://gohugo.io">Hugo</a></p>
- </footer>
- </div>
- <script src="/assets/js/konami.js"></script>
- <script>
- var easter_egg = new Konami();
- easter_egg.code = function() {
- var el = document.getElementById('thomas');
- if(el.className == "whoa") {
- el.className = "";
- }
- else {
- el.className = "whoa";
- }
- document.body.scrollTop = document.documentElement.scrollTop = 0;
- }
- easter_egg.load();
- </script>
- </body>
- </html>
|