Get Elements (Countries, Cities etc) from Google Map By View - google-maps

Is it possible to get the Elements from a Google Map by a current viewport?
Example, given following view:
Now Google Maps API should return: "Nicaragua, Costa Rica, Colombia, Venezuela, Ecuador, etc.". Basically all countries and, in this example, states of Brazil like "Amazonas, Acre, Mato Grosso, etc.". Capitals like "Caracas, Bogota, Quito, etc." are shown in the current view as well so they should be returned, too.
Is this possible somehow?

You may want to use VisibleRegion, which makes it possible to get the coordinates of your screen.The problem lies with the coverage of your search. It is too large and there is no direct solution that is available in the documentations. The search that would yield the largest result is the Radar Search in Google Places API, which would yield 200 search results in a maximum 50000 meters(radius).

Related

Is it possible to narrow down to and only include specific words in search-function, Google maps API?

I´m going to build an interactive frontend webpage with a simple map-function. I will include 10 cities from a sustainable cities-list, to choose from in the search field. Now my question is, after you have chosen one of these cities from this search field - if it´s possible to build a list to choose from, with specific words to look for in the chosen city, for example instead of choosing "restaurants" or "accommodations", have words like "organic" or "eco". My hope is that this word search will find all the places in the city with the e.g word "organic" in it, like "The organic market" or "Organic food-store" and so on. Is there a function where I can narrow down the search for these specific words in a list of like 15 by me pre-chosen words, and that this will not include all the possible imaginable words in the world, in this search field? - but instead exclude all the other words than my pre-chosen ones like "organic" or "eco" etc?
-Also, is the Google maps API best for this, or Google-places API?
Using Places API's Text Search, you can search for keywords/text string and the API will return a list of places matching the text string and any location bias that you will set.
For client-side implementation, please refer to this guide: https://developers.google.com/maps/documentation/javascript/places#TextSearchRequests
Hope this helps!

Search Through Markers with Google Maps API Like in Google's My Maps

I've created a map that has the ability to toggle data (markers) and added a search box, but I want to be able to search through my markers like in Google's My Maps, but everything that I've searched for doesn't have this feature and I've clicked just about every link there is on the first two pages and this is the closest I've found, but I'm trying to find (b) and the answer to (b) in this situation is to find any entrees within a certain radius.
This is the search feature that I'm trying to add: Example of Google's My Maps : If I search pancakes, the top results that I get are places that are on the map in which I've mentioned pancakes (instead of any place that serves pancakes).
Everything that I've done so far has been in html/javascript, so if it is possible, please try and stick to those languages.
I'm using Google's Maps API instead of My Maps because I wanted to do some extra toggling with the data that didn't seem possible with My Maps, eg make lower rated restaurants have lower opacity.
Thanks!

Google Places Radar Search Leaving Out Some Results (not referring to detail information)

When doing a Radar Search for a specific Place Type (in this case "shoe_store") the API is not returning all (within the 200 limit) places with the type "shoe_store" in that radius. It is obtaining some beyond the radius, but leaving out some within. More specifically the following API search is the one I'm looking at now:
API CALL:
https://maps.googleapis.com/maps/api/place/radarsearch/xml?location=39.0923384,-76.8564899&radius=28967&types=shoe_store&key=APIKEY
Using a radius of 28,967 I should get "shoe_stores" within roughly a 18 mile radius. I specifically am looking to ensure I get "Shoe Show" and "Shoe Dept" of which there are 7 when one does a simple "Shoe Show near 14708 Baltimore Ave Laurel, MD 20707" in the regular maps.google.com site. However, when using the Radar Search only one of them shows up while other, further out, shoe stores show up.
Am I missing something in my API call or does the API simply prioritize results as it sees fit, skipping some and not staying within specified radius?

Google Street View: How to get indoor panoramas as Google does

I'm looking for a way to get exactly the same indoor panoramas for businesses Google is showing in [Google maps] (can't add any more links).
What I did:
google.maps.StreetViewService class requires either lng/lat or pano ID, so...
convert business address to lng/lat using google.maps.Geocoder (issues occured, see below)e.g. Richard-Wagner-Str. 7, 04109 Leipzig, Germany
convert business to lng/lat using google.maps.Place (issues occured, see below)e.g. Park Hotel, Richard-Wagner-Str. 7, 04109 Leipzig, Germany
thanks to this post I found a way to get pano ID for a certain address
Issues:
None of this was working as I hoped for...
get indoor panorama by converting business address to lng/lat:found resulting panorama to be wrong business at same address (got restaurant, wanted hotel) --- and no, there was no resulting array with multiple entries
get indoor panorama by using whole search term with places API:
got slightly different lng/lat but was outside panorama instead of inside
get indoor panorama by pano ID:
working fine but still was outside panorama
Questions:
It must be working. Somehow. Any idea how Google's doing the job? (check with Google maps, review box on the left: using address responds with same outside pano Google shows as well. But how to get corresponding inside pano?)
How to make sure a pano is inside, not outside?
Quite often, Google offers multiple indoor panos for a certain business. Any suggestions how this may work?
documentation of http://developers.google.com/places/place-id#id-overview says, place-id "... can be used with Google Maps Javascript API ..."Any idea why not working with street view panos?
Many thanks!
Update
Making my questions more precise:
How do I get same indoor panoramas as Google does?
How do I get more than just one panorama per business (as Google does)?
Any chance to make street view work with Google Places place_id?
you can use this tool to extract pano ID :)
www.ekreativa.com/pano-id-extract/

are plaetze (squares) included in the google places api

I am using the Google Places Api in order to show a list of nearby places to the user. I am trying to include in the list the plaetze (squares) like Paradeplatz in Zurich:
https://maps.google.com/maps?q=Paradeplatz,+Z%C3%BCrich,+Schweiz&hl=el&ie=UTF8&ll=47.36996,8.539225&spn=0.001817,0.004823&sll=37.0625,-95.677068&sspn=34.808514,79.013672&oq=paradeplatz&hq=Paradeplatz,+Z%C3%BCrich,+Schweiz&t=m&z=18
No matter if i include all the supported Places types from here:
https://developers.google.com/places/documentation/supported_types
the Paradeplatz does not appear. Do you have any clue why this is happening?
Paradeplatz does appear in the Places data. Looks like it is in approximately the right place, not sure how to search for only "plaetze".
If you are interested specifically in displaying squares, perhaps try searching via name parameter with a value like Platz (square) instead of using the types parameter. Searching by category (types parameter) might return fewer (or none) results than expected if Google hasn't yet added the actual categories to the items in its Places API database.