Clickable place names on Google Maps - html

I was wondering if it were possible to access the names which are displayed on Google Maps and allow you to create events.
For example, would it be possible to make the name "London" (UK) clickable and have a hyperlink to some other page?
Thank you

I was wondering if it were possible to access the names which are displayed on Google Maps and allow you to create events.
No it isn't, they are part of the tiles.
For example, would it be possible to make the name "London" (UK) clickable and have a hyperlink to some other page?
You could however add a click listener to the map, reverse geocode the location of the click and perform some action based on that result.

Related

Typeform integrate google map place suggestion api

i want to add google map places suggestion API on typeform specific search text field.
is there possible anyway? because i can not find any way like via JavaScript to embed JavaScript code on typeform or 2nd i try where used this form it's also prevent to return iframe content.
My understanding is that you want to use a google places autocomplete field directly inside a typeform.
Is that right?
At the moment this is not possible on Typeform platform.
One workaround could be an intermediary step before the typeform, like a static HTML page where you present the user with such a field, and pass this data as hidden field to the Typeform.
If you want to restrict people within a certain location to answer your typeform here are some other alternatives:
using google tag manager ask for user's location, and redirect them out of the typeform if it does not fit your requirements
intermediary step to ask for user location (via the browser) and redirect them to the typeform or not
implement Typeform logic on a zipcode or country field.
Hope it helps,
You can also contact Typeform support directly if you have more precise questions.

How can I open google map for a specific region

I am using google map API to show our locations in a website
The problem:
I search something opening google.com and navigate to map, it is same as the locator on the website. It gives the same result.
When google is opened in local and navigate to map and do the same search, it will navigate to same place however the name is different. Please note it is not that name is in English and French that's the reason it is different. Basically this region on question is disputed over the countries.
Description:
When client opens google in his locale e.g. https://www.google.fr/ and navigates to google map he gets a different result, the name is different for the same place in google map as the place is in the border of 2 countries .
If you open by google.com it will show the widely accepted name whereas if you open google.xx and then open the same location the name will be different.
The locator by default is showing the global name in the website which the client does not want, he is asking for showing the name as displayed when opening from their region.
Is there a way I can set something like a data source or something to show google map based on some particular region.
Help will be appreciated.
Regards
Take a look here.
You can add an optional language parameter to the <script> tag when including the Maps API JavaScript code, specifying the language to use. For example, to display a Maps API application in Japanese, add &language=ja to the <script> tag.

Pull Suggestion out of Google Maps Autocomplete

I'm instantiating a google maps Autocomplete box, as such:
autocomplete = new google.maps.places.Autocomplete(input, options);
Now, when a user begins typing and the list of suggestions appears, if a user simply presses Enter I want the number one prediction to be used as the search term.
For example, when a user searches: London, I want to pull out and send London, United Kingdom - simply by the user pressing Enter.
I can pull out that prediction using (with the latest V3.11):
autocomplete.gm_accessors_.place.Gc.predictions[0].wg
However, this obviously relies on the "compiled" object names, such as Gc and wg which will change as Google updates their codebase.
What is the correct way of doing this? Is it supported by the Autocomplete API?
Notice
Please star this issue on Google to get a solution:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4945
there is no correct way when using places.Autocomplete, it's not implemented so far.
What you can do: the API creates the dropdown, a div with className "pac-container", and within that div for each prediction a div with the className "pac-item", you may use the text of the first .pac-item as value for the input.
A correct way would be to request the Places Autocomplete Service , but then you need to create the dropdown on your own.

Google Map InfoBar

hi am using Google map in my project like store locator. there are 2 pages where one selects the store in first and page and the map is populated in second page now i want to display selected one on load of page by default.
if you want to show a map with a marker to locate the selected store then here are the demos create a logic to check which store is selected the redirect to another page and call the function with parameter that sets the center on users selected store

Adding a Place in Google Maps through KML

Is it possible for me to do this: people will input the name of a place in my site's textbox and then upon submission, that place will be placed in the database, have my site's embedded google map updated (display all the original places and the added one) and can be toggled?
Currently, I already had a working code of getting the latitude and longitude of a certain place. Placing that information in the database is also done. I can also generate a KML file from my latlng-database. What I wanted is to have the generated kml used by my website's map to get the necessary points and be toggled whether to be displayed or not and will reflect any added area/place. To be more specific, adding a place is only by KML file, meaning the textbox in the site will be added depending on which KML the user will want to change.
Or is it better to use OpenLayers?
Thanks!