9 ms·
I made an example app to show how Google map URLs should look
- gojomo 13y agoI'm reminded of Derek Sivers' post about Japanese addresses: http://sivers.org/jadr http://sivers.org/jadr
- AlexeyMK 13y agoNot quite as heirarchical as what you've got, but check out http://mapof.it/199-valencia-st-san-francisco http://mapof.it/199-valencia-st-san-francisco
- dexcs 13y agoI like the clean interface more than the clean url :) Google should look like this...
- ultimoo 13y agoNicely done. I'd love it if it also supported modifying the URLs, since they are so readable. For example, if I delete the 199 from the end of your URL [1], it should still show me Valencia St. on the map. However, in its current state, I don't think the app parses any incoming URLs from the location field. [1] http://nice-map-urls.herokuapp.com/united-states/california/san-francisco/mission-dolores/valencia-st/199 http://nice-map-urls.herokuapp.com/united-states/california/... [2] https://maps.google.com/maps?q=199+Valencia+Street,+San+Francisco,+CA&hl=en&ll=37.769951,-122.422264&spn=0.011975,0.02178&sll=37.770189,-122.422435&sspn=0.011975,0.02178&hnear=199+Valencia+St,+San+Francisco,+California+94103&t=m&z=16 https://maps.google.com/maps?q=199+Valencia+Street,+San+Fran... [I attached google's original link just for reference]
- captainbenises 13y agoThanks. Just pushed support for that... https://github.com/bnolan/nice-map-urls/commit/2fee561a61eded6216f3a3f91688ac6fb994d2a3 https://github.com/bnolan/nice-map-urls/commit/2fee561a61ede...
- D9u 13y agoAt first, I thought that the address indicated what Google assumed was my geographic location, but a quick search returned, "The Zeitgeist Bar" in San Francisco.
- alessioalex 13y agoBtw it's cutting out some special chars to make the url pretty. Test this: Pitești, Argeș, Romania
- bestest 13y agoyeah, a definite lack of utf-8 character support -- but this could get a bit ugly from the implementation point of view.
- nakedrobot2 13y agoYeah, lots of Czech characters get omitted - anything with an accent on it. So this Na baště Svatého Jiří, 160 00 Prague-Prague 6, Czech Republic becomes this http://nice-map-urls.herokuapp.com/czech-republic/hlavn-msto-praha/prague/prague-6/na-bat-svatho-ji http://nice-map-urls.herokuapp.com/czech-republic/hlavn-msto...
- captainbenises 13y agoI'm using iconv to convert from utf-8 to ascii, but the transliteration isn't as complete as I'd like. :( Sorry it strips out prague addresses. I tried using utf-8 urls but I couldn't work out how to handle them in rails. Actually, looking at the search term you entered, I must have a bug, because the iconv output is correct, it definitely shouldn't be stripping letters out of the url.
- dsl 13y agoThe biggest problem with geocoding is that not all places have addresses. Especially in the developing/third world. It also lacks a lot of things I normally link friends to in Google Maps. For example when giving directions I always link to the street view of the main entrance.
- captainbenises 13y agoI think it'd be cool to have urls like: http://nice-map-urls.herokuapp.com/congo/kasai-occidental/kasai/mweka/25km-northeast/ http://nice-map-urls.herokuapp.com/congo/kasai-occidental/ka...
- 7952 13y agoGeocoding is about turning a textual reference into a grid reference. Without some textual reference you can't geocode. The real problem is a lack of methods for expressing uncertainty from a known definite benchmark.
- jakozaur 13y agoNice, but I would make it realtime: .../#united-states--california--
- VMG 13y agoNot necessary - http://diveintohtml5.info/history.html http://diveintohtml5.info/history.html
- tuananh 13y agothe whole thing is all about human-readble URL debate.
- erikstarck 13y agoCool. I'm working on something similar: http://addressaddress.com http://addressaddress.com (be gentle, still work in progress). I've mostly tested it with Swedish addresses, so might be problems with US ones.
- andyhmltn 13y agoThe form on the front page doesn't seem to be submitting: Chrome Version 24.0.1312.56 - Ubuntu 12.04 LTS (Desktop)
- D9u 13y agoSame here. But when I edited the URL to include my hometown, of which there are 3 places sharing the same name, the inclusion of a zip code returned the correct map.
- chewxy 13y agoI understand the need for a nice URL, perhaps indicative of RESTfulness, but I see a few problems with this: 1. From a REST point of view - the map is the resource. The adddress is well, not really a resource (the logic goes like this: if the address is the resource, the browser as a resource getter should only get the address, not the surrounds). IMHO the address should be modelled as an element of the resource, accessible by Maps' javascript. 2. Of course you can have nice URLs without being indicative of RESTfulness. Consider an address in Japan. They do not have road names, instead, they use building/block numbers for naming/addressing. While that can still be modelled as a nice URL, the convention is now flipped, and people will be confused 3. Consider that some places do not actually have an address. Like my former residence. Due to changes in the roads, my place had a new road with no name, and no actual address (well, eventually it did, and the road still has no name. Getting pizza delivered was tough) What can be done of course is a bit.ly kind of thing, which I think will work. Something like /maps/199-valencia-street-san-francisco-california-united-states. The current google maps url is already kinda like that (with ?q I believe)
- arethuza 13y ago"a nice URL, perhaps indicative of RESTfulness" My understanding is that "nice URLs" and "RESTfulness" are orthogonal. Difference implementations of the same RESTful interface could have completely different URL formats and they should all be compatible with clients written to the interface specification. Having said that, best to have nice URLs and RESTfulness.
- CiaranMcNulty 13y agoWell said. It's in some ways quite anti-RESTful for a consuming client to start to try parsing a URL semantically. "URL building" is not something a client should be responsible for, it should be (semi-)blindly using URLs the service has provided for it.
- rdsubhas 13y agoAgreed and well said. Nice URLs do not have to be RESTful, but RESTful URLs have to be nice. Personally, its just OK for me if the entire URL looks like: maps.google.com/whatever-nice-text-describing-location?ll=lat,long If the lat/long is missing, then ask Maps to do a search. If its present, then its just a "nice" URL. Not necessarily RESTful. Edit: Formatting
- rmhrisk 13y agoCool, I would love to see the source.
- captainbenises 13y agoSource is here... https://github.com/bnolan/nice-map-urls https://github.com/bnolan/nice-map-urls
- Sprint 13y agoThis might seem nice for the USA but it would fail miserably in other places (or require different URL schemes). I could not find a bigger discussion I remember on HN but https://news.ycombinator.com/item?id=2588289 https://news.ycombinator.com/item?id=2588289 might work as example already.
- badkangaroo 13y agoi love this.
- vassilevsky 13y agoGood job on the URL and on the site as a whole.
- rtpg 13y agoI live in Japan , your app doesn't work for me I tried searching 日本東京都足立区足立2丁目 (google suggestion) and your app doesn't accept. we're able to get all the computers in the world to be more or less on the same network but we still can't figure out encoding problems from 1982 edit: I messed up writing this, should have been 足立区六町2丁目. Using http://nice-map-urls.herokuapp.com/japan/tokyo/adachi/rokucho/2 http://nice-map-urls.herokuapp.com/japan/tokyo/adachi/rokuch... I get the right spot, but the search box doesn't seem to work for me(but I am behind a very high-latency line, it might be my connection that is borking) second edit: seems that the resolution is around ward-level(even when searching romanised addresses like "2-10-3 Honkomagome, Bunkyo, Tokyo", a search which works in google maps) From an intuitive standpoint, there should be no reason for this not to work, there's nothing particularly weird about the address format. I dunno
- captainbenises 13y agoI got this url, I'm not sure if it's correct (I don't read japanese sorry). :( http://nice-map-urls.herokuapp.com/japan/tokyo/adachi/ http://nice-map-urls.herokuapp.com/japan/tokyo/adachi/
- konstruktor 13y agoDoes this 日本東京都足立区足立2丁目 look like this? japan/tokyo/adachi/ Hint: It doesn't.
- ivanca 13y agoSome people in the USA tend to forget that there are other characters besides the ones the use, a little encode_url would be enough. Special Spanish characters don't work neither (áéíóúñ).
- buro9 13y agohttp://nice-map-urls.herokuapp.com/united-kingdom/greater-london/london/high-st http://nice-map-urls.herokuapp.com/united-kingdom/greater-lo... Whilst it is a nice idea to put textual labels in, and whilst it may work for grid-based cities such as those in the USA... it's really going to have a problem in Europe where many large cities are the result of growth over centuries and the merging of villages and towns into cities. London has so much duplication in things like High Street, Church Street, Chapel Lane, Market Place... and the system outlined will just fail to disambiguate. The only thing that could truly work on a global level is some geospatial identifier in the URL, with text that followed it. But then if the place itself was large it could span multiple geospatial points and result in duplication. Duplication of URLs is probably better than ambiguity over what the URL points to. PS: I tried to do a query on Open Street Map to discover how many High Streets there are in London but I hit the limit of their disambiguity service. And there are High Streets from one old village that have been extended to the point that they touch the High Street of another old village. 2 different High Streets with an almost identical postal code. PPS: Perhaps a post-code? In the UK it's good enough to give someone a post-code and door number and you can get to their front door. How that would work globally I do not know... fine for most of the Western World, useless in India maybe, etc.
- captainbenises 13y agoIn theory there should be only one high street per locality. I didn't try the app with london urls (only berwick street which worked fine [1]). In theory if you can unambiguously write the address of a place without relying on the postcode, then you should be able to construct a unique url for the place. 1. http://nice-map-urls.herokuapp.com/united-kingdom/greater-london/city-of-westminster/london/berwick-st http://nice-map-urls.herokuapp.com/united-kingdom/greater-lo...
- buro9 13y agoTheory meets practise. It is not possible to unambiguously write all addresses in the UK without including the post code. The post code and door number are the primary key of the data. Edit 1: A fine example: http://nominatim.openstreetmap.org/search.php?q=high+road%2C+uxbridge&viewbox=-0.5%2C51.54%2C-0.44%2C51.51 http://nominatim.openstreetmap.org/search.php?q=high+road%2C... Zoom out one level and you'll see that High Road is surrounded on both sides by High Street. And yes, that is correct.... High Street > High Road > High Street = One road in one very old town. Crazily if you look down a little further you'll see the Southern High Street (A408) goes East, and what is technically another High Street heads on Southwards. 3 High Streets, and 1 High Road... in less than 1 mile in 1 town. I was actually looking for the Church Road in Uxbridge that comes off of Church Road, but I think Google Maps incorrectly has both of them as Church Lane. Edit 2: Here you go: http://nice-map-urls.herokuapp.com/ub5/united-kingdom/england/greater-london/london-borough-of-ealing/london/church-ln http://nice-map-urls.herokuapp.com/ub5/united-kingdom/englan... Church Lane coming off of Church Lane. One is the A312, the other is just Church Lane. Google is wrong on this, they're both called Church Road. And historically they were the same thing, but as it evolved from a way to get to the church to a market thoroughfare one main road emerged and left the other road as a side road. Over time this actually led to both roads being distinct, and with their own door numbering schemes, even though they meet each other. I find the history of places as fascinating as the history of languages.
- fractalsea 13y agoI loved the full screen-ness of it!
- aidos 13y agoI applaude the effort - but there are plenty of places where this falls apart. The most glaring I can think of is Nicaragua - where addresses are described based on landmarks: Eg "From the Calvario Church, 1 block south, half a block east" http://vianica.com/nicaragua/practical-info/14-addresses.html http://vianica.com/nicaragua/practical-info/14-addresses.htm...
- civilian 13y agoTo be fair, a lot of things fall apart in Nicaragua. I remember visiting some distant relatives in Sweden and the directions we got were all "take the 3rd light down, and then you'll pass the park, swing a right..." There were road names, my great-aunt just didn't know them. It worked, but it was not a great system.
- magicor 13y agoThis seems somewhat simpler http://mapa.arredemo.org/ http://mapa.arredemo.org/ Anyway they both feel nice.
- TillE 13y agoYou got Berlin right and even split Kreuzberg off from Friedrichshain-Kreuzberg. It's a little buggy and your URLs should probably convert ß to ss, but I'm impressed.
- konstruktor 13y agoFor us native speakers of German, using ss instead of ß or ae instead of ä seems like no big deal. But by accepting this when dealing with Americans, we strengthen the belief that everything can be forced into ASCII, which really fucks over people from countries that are smaller markets but either have different character sets or where diacritical signs are semantically relevant. edit: spelling
- rmc 13y agoNow make it work internationally. Good luck with all the address formats and disagreements about addresses (and places like Ireland where the address can be in either language).
- raverbashing 13y agoAnd Belgium (and Quebec maybe) Not sure how GMaps deals with this
- konstruktor 13y agoJust because your native language can be expressed in ASCII, your name can be split into a first and a last name and you live in a country with grid-like streets doesn't mean that internationalization and anything related to location is easy. Apple learned it the hard way.
- paulsutter 13y agoPeople are making great points about ways to improve the service based on the way addressss vary around the world. Could we present these as helpful suggestions, especially including one or more examples based on our local knowledge? Rather than everyone piling on with dismissive one-upmanship?
- gambiting 13y agoIn the UK it's enough to provide a postcode and the house number to find a specific place. So you can compress: Flat 3, Bowsden Court, South Gosforth, Newcastle Upon Tyne To: 3, NE3 1RR And that's it, it just can't mean anything else. However, in other countries, like Poland, a postcode is used per city, so a postcode 32-600 is not telling you much apart from the name of the town, you need to provide a full address.
- arethuza 13y agoIn some cases (at least for Google) a postcode seems to be enough if there is only one property in that postcode. e.g. KW11 6UF
- micheljansen 13y agoThe UK is pretty much an exception to the rule here though. In most other places in the world, including the US, post codes are not nearly as precise (source: worked on a real estate search engine that deals with addresses in 8 countries, including UK and India).
- grey-area 13y agoThat's not true for most uk postcodes - many in rural areas represent an area larger than even one town, so a full address is also required. They vary from representing one address to hundreds, it's not really consistent. It does seem strange that postcodes are not unique to addresses but they were originally just zones intended to help routing. Eventually we will probably end up with one global address space with unique identifiers for addresses like ips and dns; it would clear up a lot of ambiguity while leaving the rest of the address to function as a human readable equivalent. lat,lon doesn't really work as addresses can be on top of one another.
- vdondeti 13y agoI took another approach to this. I have been meaning to post it to HN for a while, though it is still a little raw. I call it geokode - https://geokode.com https://geokode.com - it is meant to be like bitly for location. You can essentially choose what your url should be for any location. This makes it very user-friendly and you can also brand your location link. Currently, you can only use English characters and numbers. I have pre-populated it with some entries (see examples below), but the goal is to get users to create their own 'geokodes' as I like to call them. I am also working on a API to make the location data available once the geokode is provided. You can even link a geokode to GPS coordinates, which will be especially useful in countries where addresses are not simple. Obviously, the site needs a lot more polish, but let me know what you think. It is currently free to register a geokode - I have to update the demo video. Some examples to highlight use cases: https://geokode.com/*abckitchen https://geokode.com/*abckitchen https://geokode.com/*disrupt https://geokode.com/*disrupt https://geokode.com/*joneswedding https://geokode.com/*joneswedding https://geokode.com/*dormroomfundhq https://geokode.com/*dormroomfundhq Also, I will be at TC Disrupt in NY today in the Startup Alley in the Mobile category. Feel free to come by.
- hnriot 13y agoPeople already have geocodes, it's their address. Nobody wants yet another address.
- raverbashing 13y agoStop it. I know, nice idea, 'REST' etc, good looking. Stop it. As all the other comments stated, this will break down around the corner. Country name. How do you locate a point in the ocean? What about Österreicht (easy level). ประเทศไทย (hard level) State name. Not all countries have states. Or they're not used day to day. So in case of Ireland, do I put 'Dublin' or 'Leinster' 'Mission-dolores'? Street name? Street number? Oh and by the way, the street numbers match the google maps position if you're lucky (it's getting better)
- rschmitty 13y agoNo, you stop it. Why on earth are you concerned about a point in the ocean? Do you need driving directions there? Or perhaps street view? I didn't realize most ships these days navigate with google maps I'm sure if google implemented something like this they would still support search and linking by lat/lon.
- raverbashing 13y ago"Why on earth are you concerned about a point in the ocean?" Why would I really? After all it's only 2/3 of the planet. More realistic case: streets that haven't been mapped, rural roads.
- smiler 13y agoNot every solution has to work for every country. This would be very nice for the UK and our address system works great.
- mtgx 13y agoI wish Google would improve their Google+ url's, too, now. Are they still allowing to choose your own vanity url, or did that work only for a limited time period last year?
- FailMore 13y agoFantastic.
- kidsil 13y agoDirections might be tricky as the URL will become a lot longer (especially if you're giving directions to multiple locations)
- mnml_ 13y agoGoogle isn't so good at SEO ? ;)
- DivisibleByZero 13y agoIt's always bothered me that Google doesn't have pretty URL formating. Well done here.
- micheljansen 13y agoI think trying to make geo URLs nicer is a noble effort, but this approach takes a far too naive world view. Addresses are messy. In most parts of the world (even the "western world"), addresses are hopelessly ambiguous and much of the world cannot nearly as nicely be divided into a neatly hierarchical addressing system as this example suggests. Real-world addresses are ambiguous, confusing and messy. Pretty much the opposites of qualities that make for a good URL scheme. How do you deal with multiple places with the same name, or one place that is known by many names? Disambiguation pages and 304 redirects to a single canonical name (which might piss a lot of people off if it's a disputed area)? Most civilised parts of the world have developed more precise, less ambiguous addressing systems over time, using post codes and other systematic approaches, but even those are not always watertight, often volatile and only work for places where some body issued them (good luck in the desert or ocean). Geocoding is hard, and reverse geocoding (from a place to a name) is even harder, but fortunately we already have a clear, concise and unambiguous way to address places on earth: the Geographic Coordinate System. Every place on earth can be addressed using a simple latitude/longitude coordinate pair. It's not pretty or user friendly, but at least it's fool-proof. Why not take a much simpler approach, similar to how many blogging platforms generate pretty urls from post titles? The URL in the example could then be: https://maps.example.com/37.769944,-122.422264/199-Valencia-St-San-Francisco Or just as conveniently: https://maps.example.com/37.769944,-122.422264/Zeitgeist-Bar This way, multiple URLs can exist for different entities in the same geographic space. Multiple places with the same name are also much less of a problem this way: https://maps.example.com/51.528642,-0.101599/High-Street vs https://maps.example.com/51.528642,-0.101599/High-Street For a real-word mapping service, there would probably be a need to specify a zoomlevel or bounding box, but those could be provided as URL parameters. Ironically, this is very close to how the URLs in Google Maps currently look. Not as nice, but at least it's actually feasible and future-proof.
- Terretta 13y ago> In most parts of the world (even the "western world"), addresses are hopelessly ambiguous And yet, astonishingly, you get your mail. If the mail can find its way to the right point, so can this type of URL. Your counter examples are interesting but not what this example is showing: a nice URL for a physical mailing address. Presumably one would fall back to lat/lon if one is trying to do something other than find an address. > just as conveniently Contrary to the OPs example, having to look up lat/lon first in order to pinpoint an address on a map seems not convenient at all.
- the_imp 13y agoHow exactly is this any nicer than what Google Maps already does? http://maps.google.com/maps?q=199+Valencia+St,+Mission+Dolores,+San+Francisco,+CA,+United+States http://maps.google.com/maps?q=199+Valencia+St,+Mission+Dolor...
- fsniper 13y agoWhy everyone is trying to make this to work for every address available over the world? Why not just let it work for where it can work for and then iterate? What happened to the MVP idea? This is a clever and intuitive idea. Nice work ;)
- barryhunter 13y agoGoogle Maps have tried this, I guess it failed, because it no longer distributes such urls, but for the most part the old links still work, eg https://maps.google.com/places/ca/bc/nanaimo/wallace-st https://maps.google.com/places/ca/bc/nanaimo/wallace-st or https://maps.google.com/places/uk/london https://maps.google.com/places/uk/london In fact the 'example' url pretty much works https://maps.google.com/places/united-states/california/san-francisco/mission-dolores/valencia-st/199 https://maps.google.com/places/united-states/california/san-... http://www.jasonbirch.com/nodes/2009/09/24/365/google-place-pages-indexable-not-really/ http://www.jasonbirch.com/nodes/2009/09/24/365/google-place-...
- Millennium 13y agoIt's a very nice-looking URL, but I'm not sure how practical it is. Although the idea that "Cool URLs don't change" is not explicitly stated as one of the core principles of REST, it is nevertheless important. But political boundaries and names do change: some more frequently than others, of course, but they all change in due time. If the URLs are not kept up-to-date, then the mapping API becomes a lot less useful, but it also becomes a lot less useful if they ARE kept up-to-date.
- kaoD 13y agoPaseo de la Estación turns into paseo-de-la-estacin, which is not very pleasant. Don't just strip these! paseo-de-la-estacion would be better.
- joeblau 13y agoI wrote a speed trap application a few years ago and I used this similar structure for speed trap locations. eg http://www.vroomtrap.com/speed-trap-list/united-states/california/san-francisco/1900-mission-st-san-francisco-ca-94103-usa--VT144-2 While that scheme works well in the US and in English, some other countries/languages can't follow that pattern consistently. You'll also run into name collions that will break your scheme. I had to add a unique ID at the end of every address just to make sure I didn't get address collisions.
- NelsonMinar 13y agoGoogle Maps URLs could sure use some help. But I don't know that street addresses are a great naming system. If you want to use lat/lon, many open source tools like Polymaps, ModestMaps, and Leaflet (with the leaflet-hash plugin) support updating the URL automatically on navigation. (No "click here for URL"). For example, here's a clean URL to a map app that describes the base layer, zoom, and lat/lon: http://maps.stamen.com/#toner/12/37.7706/-122.3782 http://maps.stamen.com/#toner/12/37.7706/-122.3782
- rocky1138 13y agoI get this in the JS console: [blocked] The page at https://nice-map-urls.herokuapp.com/united-states/california/san-francisco/mission-dolores/valencia-st/199 https://nice-map-urls.herokuapp.com/united-states/california... ran insecure content from http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false http://maps.googleapis.com/maps/api/js?libraries=places&....
- sghill 13y agoNice work on an interesting project! Google Maps' urls were always hideous for sharing before they introduced the shortener. Maybe worth noting? I opened this up in Firefox (Aurora) for Android, which changes the URL bar to show only the page title until you tap it.
- dbg31415 13y agoRemind me again what the point is? I think this takes an incredibly narrow view of addresses. Many times they aren't just a number on a street -- one street can go by multiple names, one street can have multiple identical numbers (seriously try living outside of the US for a while). So what Google does is allow for flexibility. And it works. Quite well. It's not perfect, but that's because the real world didn't have an IA or DBA designing it. Also, all those / can't be good for SEO...
- habosa 13y agoThat is a very nice demo and those are very clean and readable URLs. However I'm not sure how useful it is because I think one of the main advantages of human readable URLs would be making a scheme that I could generate by hand from an address I know. I think this scheme requires too much information, specifically in the "neighborhood" part. I didn't even know what to put between the city and the street in my own home address. I like the suggestion here: https://news.ycombinator.com/item?id=5625126 https://news.ycombinator.com/item?id=5625126