Spatial and Attribute Searches in Google Maps Data API

by | Dec 16, 2009

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.


Recent Posts

Eric Pimpler
Eric is the founder and owner of GeoSpatial Training Services ( and has over 25 years of experience implementing and teaching GIS solutions using ESRI, Google Earth/Maps, Open Source technology. Currently Eric focuses on ArcGIS scripting with Python, and the development of custom ArcGIS Server web and mobile applications using JavaScript. Eric is the author of Programming ArcGIS with Python Cookbook - 1st and 2nd Edition, Building Web and Mobile ArcGIS Server Applications with JavaScript, Spatial Analytics with ArcGIS, and ArcGIS Blueprints. Eric has a Bachelor’s degree in Geography from Texas A&M University and a Master's of Applied Geography degree with a concentration in GIS from Texas State University.

Sign up for our weekly newsletter
to receive content like this in your email box.