Activate your free membership today | Log-in

Thursday, July 2nd, 2009

GeoMaker – geo locations as microformats or a map from texts or URLs

Category: JSON, JavaScript, Yahoo!

As preparation for an upcoming tech talk about Placemaker I thought it would be good to take a bit of the pain out of the geolocation service by making an interface for it. Placemaker works the following way: you post some content or a URL to it, it goes through the content or gets the content from the URL and analyzes it. It then finds geographical locations in the text and disambiguates them (for example to skip names like "Jack London" and not consider it the city London). Finally you get it back as XML.

The annoying thing is that Placemaker only support POST request and does not have a JSON output - for now. GeoMaker allows non-developers to enter some text or a URL, filter the results (using YUI datatable) to remove false positives (no system is perfect) and get the embed code for a Yahoo Map or a list of microformatted locations as copy+paste. See the screencast to get the end user experience:

Of course, every time you build something like that, red-blooded developers will ask for an API to do the same thing (and pointing them to Placemaker wasn't enough). So here it is:

http://icant.co.uk/geomaker/api.php takes two parameters: url of the web document to load and output which could be map, kml, microformats, csv, or json (with callback for JSON-P). Using this you can analyze a url in JavaScript and get the data back as an array:

HTML:
  1. <script>function geomaker(o){
  2.   for(var i=0,j=o.length;i<j ;i++){
  3.     // o[i] will have lat, lon, title and match
  4.   }
  5. }</script>
  6. <script src="http://icant.co.uk/geomaker/api.php?url=http://ajaxian.com&output=json&callback=geomaker"></script>

The Ajaxian.com output right now would be:

JAVASCRIPT:
  1. geomaker(
  2.   [
  3.     {"lat":"42.3586","lon":"-71.0567",
  4.      "title":"Boston, MA, US","match":"Boston"},
  5.     {"lat":"42.3586","lon":"-71.0567",
  6.      "title":"Boston, MA, US","match":"Boston, MA"},
  7.     {"lat":"40.7075","lon":"-106.918","title":"Clark, CO, US",
  8.      "match":"Clark, Co"},
  9.     {"lat":"42.3115","lon":"43.3658","title":"Georgia",
  10.      "match":"Geo"},
  11.     {"lat":"44.9601","lon":"7.16229",
  12.      "title":"Rey, Piedmont, IT","match":"Rey"}
  13.   ])
  14.  

Posted by Chris Heilmann at 3:02 am
9 Comments

+++--
3.7 rating from 12 votes

9 Comments »

Comments feed TrackBack URI

Sometimes the length of the representation of geo locations also matters e.g. in Twitter messages. Therefore I would like to represent a solution for this:

The service Twittori uses a modified Geohash algorithm (see Wikipedia for details) to create very short URL which just consume 6 characters to represent a geo location. Here is an example: http://GE0.at/0GGmJW.

This could be an alternative for other services too, to not need to use the TinyURL services for geo location purposes in Twitter.

Comment by perenzo — July 2, 2009

Freaky timing – just the other day I was just talking about how useful a service like this would be to Ubiquity. Anyway, looks very promising!

Comment by Unfocused — July 2, 2009

With the changing trend of the world, wedding apart from white,Princess Strapless Satin Evening Dress ivory, beige and other traditional colors,are also increasingly popular in recent years, ghetto prom dressespink wedding package,gothic prom dresses such as pink, pink orange, baby blue, purple night, light green and light silver-gray, very soft and pleasing to wedding hair accessoriesthe eye; if you have the courage to try, dark green, purplish red, deep purple, decorated in pink wedding dress, the formation of rich colors,the dress, the effect is very special;Sash Lace Satin Flower Girl Dress, laden with flour colored silk flowers, butterflies, in order to add color.wedding dressIn fact, the wedding is the color of lesser importance, the most important prerequisite is to match the bride’s complexion. Oriental deep and yellowish color, wearing white Mermaid Satin Organdie Wedding Dress,will appear dull, wearing ivory would be more harmonious and natural, baby blue, wedding accessoriespurple night can not be coordinated with the yellow, but pink orange, light green with yellowish color match. As for the skin and rosy, or bronze skin, wearing white will look great, wedding dress

Comment by wuwei — November 10, 2009

A wedding dresses is always

expensive. Every couple will agree on this.When you are planning for

your wedding, you will probably find that every item can be very

expensive. This is especially true when it comes to the wedding dress.
You may think that there is no way for you to get a Wedding gown dresswhich is

elegant and at the same time cheap. However, I can tell you that there

are some ways to save money on this item.
So, the question here is how to make your white wedding dressinexpensive.
In fact, one thing you need to understand is that it is totally

possible for you to find a cheap

wedding dress which is also elegant and beautiful. You do not need

to sacrifice the quality just because you will need to search for cheap wedding gowns items.
As a matter of fact, one of the ways to get a bridal gowns is to wear the one

your mother wore when she got married. The point here is that you will

be wearing a bridal dresses

item and it will certainly be very stylish.

Comment by wuxiseo — November 26, 2009

The principal concern whenever lifting heavy objects on an uneven

surface is to ensure stability. The basic wedding dresses esign premise of

a cantilever hoist is to include a heavy counter weight that opposes

the load and ensures longitudinal seostability in use.
This use of a counterweight is backed up by a relatively wide chassis

on fully lockable 8 inches by 2 Electric hoist inches phenolic

casters.Whenever you need to be able to electric hoist or lift a

weighty object from the floor onto a higher level, having a lifting

system chain hoist that you

can rely on is essential. Unfortunately, there are always situations

where it is simply not possible to use conventional chain block lifting gear such as

jibs or fork lifts, and under these situations, when it is Snatch Block necessary to be able to raise a

weight quickly, then a cantilever hoist is often the best choice.

Comment by wuxiseo — November 26, 2009

“The annoying thing is that Placemaker only support POST request and does not have a JSON output – for now. ” — Agreed. You need
plus size wedding dresses .

Comment by 2044060407 — December 14, 2009

β€œThe annoying thing is that Placemaker only support POST request and does not have a JSON output – for now. ” β€” Agreed. You need
plus size wedding dresses

Comment by 2044060407 — December 14, 2009

Unfortunately, there are always situations

where it is simply not possible to use conventional
mbt chapa shoes
mbt women’s chapa shoes
mbt mwalk shoes
mbt women’s mwalk shoes
mbt sport shoes

Comment by Handbags — January 14, 2010

Pass4sure is an expert in providing the most valuable training materials for IT certification exams, equipped with accurate exam questions and verified answers, considerate & warmhearted service and complete safeguard measures. The Affiliate Program is a marketing strategy that Pass4sure adopts to assemble more dealers for propaganda and profit.The Most Popular exams List :642-515642-164 650-180 642-357 646-656 HP0-D04 BH0-004 350-030-LAB 650-621 642-373 220-602 642-661642-524 646-656 642-164 XK0-002 VCP-410 642-975 N10-004 646-363 642-971 642-654 640-802 Click Pass For Sure to get more information!

Comment by pass4sure — February 24, 2010

Leave a comment

You must be logged in to post a comment.