Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use Google Places API. </p> <p>Docs: <a href="https://developers.google.com/places/documentation/search" rel="nofollow">https://developers.google.com/places/documentation/search</a></p> <p>Supported location types: <a href="https://developers.google.com/places/documentation/supported_types" rel="nofollow">https://developers.google.com/places/documentation/supported_types</a></p> <p>After you have recieved the users location, make a request like that with your location and relevant types:</p> <pre><code>https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&amp;radius=500&amp;types=food&amp;name=harbour&amp;sensor=false&amp;key=AddYourOwnKeyHere </code></pre> <hr> <p>Here is a fiddle based on yours, without using fusion tables: <a href="http://jsfiddle.net/iambnz/M9KrK/" rel="nofollow">http://jsfiddle.net/iambnz/M9KrK/</a></p> <p>Add this to your libary call:</p> <pre><code>&amp;libraries=places </code></pre> <p>Add this to your code:</p> <p>Global var:</p> <pre><code>var service; </code></pre> <p>If statement when you found the users location:</p> <pre><code>var request = { location: pos, radius: '500', types: ['store'] }; service = new google.maps.places.PlacesService(map); service.nearbySearch(request, callback); </code></pre> <p>After maps init:</p> <pre><code>function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i &lt; results.length; i++) { var place = results[i]; createMarker(results[i]); } } } function createMarker(place) { var placeLoc = place.geometry.location; var marker = new google.maps.Marker({ map: map, position: place.geometry.location }); } </code></pre> <p>I hope this points you in the right direction. </p> <p>Example with sidebar + FT usage from @geocodezip: <a href="http://www.geocodezip.com/geoxml3_test/v3_FusionTables_Watershed_Stewards_Map_sidebar2.html" rel="nofollow">http://www.geocodezip.com/geoxml3_test/v3_FusionTables_Watershed_Stewards_Map_sidebar2.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload