geo2web.com

Review of GIS GPS GEO and MAPs technology

geo2web.com header image 4

Photo Search on Google Maps - Tickr

June 12th, 2008 · No Comments · Maps

::: via :::

Tickr

Sometimes the best ideas are also the simplest ones. Tickr is a simple idea but also a great one. In essence Tickr lets you search Flickr by keyword and location.

Why is that so great? Well, it means you can make some great visual comparisons of different cultures around the world. For example, the images in this post show some of the differences in fashion in California and Japan. I’ve just spent at least one happy hour comparing ‘houses’, ‘pubs’ and ‘businessmen’ in different countries.

The examples on the Tickr homepage include ‘architecture’ in ‘Rome’ and also ‘glaciers’ in ‘Alaska’. The latter example is a good demonstration of another feature of Tickr - the time-line. As well as showing the location of photos on a Google Map, Tickr also presents the photos in a time-line based on when the photographs were taken. This means that in the given example it is possible to compare photographs of glaciers taken in 2001 to photographs taken this year.

Other Flickr Maps

__________

[Read more →]

Tags: ··

Bringing Richer Data to a Local Search Near You

June 9th, 2008 · No Comments · Maps

::: via :::

When I search for a business, I often want more information than just the address and phone number: I want to know what people are saying about it and what it looks like. Many results in Google Maps have had this information for some time now, but it’s always been a couple of clicks away. Now richer data automatically appears in the left panel.


When I travel from the Google NYC office to visit the Mountain View office, I can get a quick overview of the hotels near Mountain View just by scanning the left-hand panel. I can see a picture of the hotel and read a snippet from a review, and I’m just one click away from voicing my own opinion by clicking the “Write a Review” link.

This improved browsability makes for all sorts of interesting queries. For example, I can browse the real estate market by doing a real estate in Chelsea, NYC search. (When I compare those results to the results for real estate in Mountain View, CA, I think that maybe I should consider moving to the Google Mountain View office instead of just visiting!) Or I can read about the locations that people have dubbed as their “favorite restaurant” by doing a favorite restaurant in NYC search.

So, the next time you find yourself looking for books in Cambridge, MA, paneer near London, tourist attractions in Brazil, schools in Nairobi, or Elvis in Memphis, be sure to Google Map it for an overview of reviews and images. Once you narrow down your choice to one or two options, there’s still the “more info” link which takes you to an info-window with more reviews, more images, related webpages, and basic information about the business, including hours, pricing, and the official website. So go ahead and local search your hearts away!

Have a business? Go to the Google Maps Local Business Center to add your business information and photos.

[Read more →]

Tags: ·

App Engine, Local Search, Maps: Making Static Maps… Interactive?

May 28th, 2008 · No Comments · DevMap, Maps

JavaScript and Flash are great for putting Google Maps on your website, but sometimes they just won’t do. For mobile browsers or users with dial-up connections, simpler is better. So I wrote an open source non-JavaScript version of Google Maps which is designed to show how easy it is to write an application on App Engine that makes use of two new APIs from Google: The Static Maps API and the Local Search API’s REST interface. It doesn’t have advanced features like street view and public transportation, but it gives you a searchable map that you can zoom in/out on as well as save locations. It also automatically saves your last map view so that every time you go back to the site it will show you what you were last looking at. Check out the source code.

It uses App Engine to store saved points, the AJAX LocalSearch REST API for search functionality, and the Static Maps API to display maps. App Engine is easy to learn and the data store is useful for this kind of application. The REST API for LocalSearch is also very simple. For more information on it, go here.

To use the Static Maps API, you just need to create a URL with the proper parameters for your desired map view. Keep in mind that you need to set the zoom level (unless you are specifying multiple points — then it’s calculated for you). In the vast majority of cases, this is completely fine. In my case, though, I needed to know what the zoom level was, so that I could give the user the option to zoom in/out. That meant coming up with calculations of the zoom both for the multiple points and single point case, and that was the trickiest part of the app.

If you use the AJAX Local Search and it returns one result then there will be a viewport object returned with it. This viewport contains the Northeast and Southwest latitude/longitude bounds that are optimal for displaying this point. However, Static Maps only accept zoom levels and center points. Here’s the Python to generate that information:

viewport = json['responseData']['viewport']
mercator_projection = MercatorProjection(18) # Checkout the MercatorProjection class
southwest = [float(viewport['sw']['lat']),float(viewport['sw']['lng'])]
northeast = [float(viewport['ne']['lat']),float(viewport['ne']['lng'])]
bounds = [southwest, northeast]
zoom_level = mercator_projection.CalculateBoundsZoomLevel(bounds, MAP_SIZE)

At this point you will have everything you need to construct the map: the center point (the Local Search point), zoom level, marker point.

Then there’s the case where you have multiple points returned by the AJAX Local Search. Since we will have a collection of latitudes and longitude points that we want to display we can just find the min/maxes, do some rounding, and voilà you get a bounding box. With a bounding box and a calculated center point, you can repeat the same steps as before.

mercator_projection = MercatorProjection(18)
bounds = CalcBoundsFromPoints(lats, lngs)
center_point = CalcCenterFromBounds(bounds)
zoom_level = mercator_projection.CalculateBoundsZoomLevel(bounds, MAP_SIZE)

From line 121 to about 285 you’ll find all the necessary functions for the situations described above. Try using this code to create your own interactive version of Static Maps, and let us know in the forum if you have questions or just want to show off your nifty app.

[Read more →]

Tags: ··