Skip to content

Places keyword search using MapQuest API with Google Maps presentation. Gets all places (no limit). Exportable.

License

Notifications You must be signed in to change notification settings

ConsultBuckner/Find-Places-Map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Find-Places-Map

The Google Places API, part of the Google Maps Platform, allows searching for places by keyword via the Places API Text Search feature. While the service allows you to geo-fence your query, there is a strict limit of 60 results with each place result incurring the maximum fee from Google. This means it is nearly impossible to get a complete list of places from a Google Maps search.

MapQuest offers a similar API but with a 500 place result limit and a generous 15000 place API requests per month for free. This project utilizes the base Google Maps API for displaying the results from the MapQuest Place Search API with the visible map bounds acting as a geo-fence.

Additionally, to make sure all possible results are returned, the app will exponentially subdivide or tessellate the visible map bounds into smaller search areas of equal size as the total area of the map bounds increases by zooming further out. Each subdivision triggers an asynchronous Places API request.

Finally the app offers the option to copy the results to the clipboard, or export a tab-delimited document with all the results. And for curious users, there is a Toggle Matrix button which will reveal the tessellated search matrix on the map with each rectangle showing how many requests were run and results returned from the MapQuest Places Search API. This last feature utilizes the Google Maps Overlay View object that is subclassed to allow drawing custom text labels directly onto the map Overlay Pane by further manipulation of the MVCObject Class.

Requirements

You will need an API Key for Google Maps and for MapQuest and these should be stored in an .env file or .vscode/launch.json file for local development using the following key names: GOOGLEMAPSAPIKEY and MAPQUESTAPIKEY

Demo

View Demo Here