Spatial and Attribute Searches in Google Maps Data API

Posted on December 16, 2009. Filed under: Google Maps |

Based on this announcement from Google if you haven’t taken a close look at the Google Maps Data API yet you may want to consider doing so now with the addition of spatial and attribute search capabilities to the API.  Search Feeds, similar to Feature Feed URL’s, take the form:

Search Feed URL Example

Spatial queries can accept either a bounding box or a radius (from a lat/long center point) to use as the input geography for performing a searching.  Matched features within a defined area can also be sorted by distance from the input lat/long.  In the code below a bounding box is used as the input search geography.

Attribute searches can be implemented against a feature’s structured key/value pairs.  An array of key/value pairs are passed in to the query as seen below where we are searching for all features in a map containing the attributes pool: true and price:budget.

I don’t see mention of the capability of combining spatial and attribute queries but I would assume that you only need to include the appropriate parameters for each.

This is a nice addition to the Maps Data API and will make it a much more attractive platform for web mapping applications.  Obviously it doesn’t provide advanced search capabilities, but for simple applications it is an attractive solution.

Make a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: