Register new place google places via API - javascript

Is it possible to register new place in google place via google maps API?
I have searched on the documentation and found nothing. Some stackoverflow questions on this were getting no response.
Thank you for the help.

I don't think that it is possible to add a business place via the API. If you want to add a new place to Google Places, you will have to register it manually.
Here you can find a tutorial of how to add places to Google Maps.

Related

Need to add the new Google Maps API KEY to my existing Drupal7 site

In my drupal site i am getting the error alert like "This page can't load Google Maps correctly.". My website is built on drupal7. Where to add the script tag with that new API key generated through admin login UI. I mean in which module of UI i has to change. Please find the attached screenshot for reference.
Any quick help more helpful.
You need to get a license for google maps api as , Google has implemented a new Pricing module in july for google maps.
Google's new billing and pricing model requires you to add a credit card to use even the free API's. If you are using the Javascript API for Static Maps, it is no longer free. The documentation/tutorial page which shows code examples, will provide a key, however it will not work until you add your billing info.
https://cloud.google.com/maps-platform/pricing/sheet/
https://developers.google.com/maps/documentation/javascript/tutorial

Converting iFrame Business Maps to Javascript API maps for dark mode

I have always worked very effortlessly with Google Maps and their iFrame which displays the business on the webpage with their information, like this.
How is this possible with the javascript API? I have succesfully made a dark map with that, but I want to display the business also. Do I have to use another API for that?
I dont believe this is possible using only the google maps api. You could use the Google Places api https://developers.google.com/maps/documentation/javascript/places#place_details.
Then you would need to create your own display for the information. I dont think there is any way to get this kind of functionality right out of the gate.

Google Maps API error: DeletedApiProjectMapError

I have to use google map. I use below google API script
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY"></script>
And i got below Error
Google Maps API error: DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error
I created a New Project & New API key. But still this error came. Kindly help to solve this error.
Yo should go to https://console.developers.google.com and after create your API KEY, go to "Google Maps JavaScript API" and just ENABLE (by default is DISABLE)
You need to enable Maps JavaScript API for your website.
API link: https://console.developers.google.com/apis/library/maps-backend.googleapis.com?q=map
Based from this documentation, the DeletedApiProjectMapError means that your API project may have been deleted from the Google API Console. Please check the project for which you generated the API key that's included in JavaScript API loader.
Since you have already created a new API project and get a new key on the Google API Console, one workaround I found on this forum is to try deactivating all plugins to see if one of them is causing a conflict.
Check this related link. It states that:
I created new API keys in the first project for those maps again and deleted second project. The maps work partially now - without markers. It looks a little like manual blocking by someone on the Google maps side. Maybe someone is blocking access to Marker Manager .js file somewhere between my computer and a server where it is stored to ban my website.
Hope this helps!
I activate/enable more API Google Maps on https://console.developers.google.com and disappear this error.
You have deleted the project in google cloud platform of which you created an API.Regenrate Api by creating a new Project in google cloud platform.
There some answers saying the JavaScript API needs to be enabled as it is disabled by default. That seems to have changed. It was enabled by default in my account. It did not work anyway. I had to disable and reenable the API, then it worked.
Also it is to be noted that Google says it may take a couple of minutes upon creation until the API key works, that may also have been the thing.

Autosetting search terms when implementing google maps in website (javascript)

I'm using google maps to geolocate users on my website. After that I would need to find different services near them (I would like to have ability for webpage to input search term in google maps with geolocaion) Is this possible? and if it is how could I do it?
You can use following example for searching places.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&type=restaurant&name=cruise&key=YOUR-API-KEY-GOES-HERE
You have to create project in google console using below link
https://console.developers.google.com
Then create browser key and that key is which you have to use in above url which mention.
Last thing you need to enable Google Places API Web Service from https://console.developers.google.com
See below link for more detailed document.
https://developers.google.com/places/web-service/search#PlaceSearchRequests
Let me know if any issue you faced.

Google Maps API Send Email With Directions

I used the Google Maps API to create a map with a custom input field that displays directions to a fixed address after the user submits the starting point in the form. Now I would like the user to be able to email herself or another person a link to google maps with the directions already plugged in. This functionality already exists on regular google maps but I don't believe there's anything built into the API for reproducing this. Does anyone have any ideas or thoughts?
PS, sorry I can't include a link to the site because it has not launched yet and I don't think my client would want everyone looking at their new site before it's finished :). However, I'll try to clarify as much as needed if anyone is confused. Thanks.
Seth is right, you can generate the right url to Google Map service knowing the correct parameters.
This ressource lists several url formats.
My personal favorite is :
https://www.google.com/maps/dir/<start-location>/<other-location>
You can use it with an address or latitude/longitude, like :
https://www.google.com/maps/dir/48.856614,2.352222/52.520007,13.404954
You could just create a link that is populated by your code.
http://maps.google.com/maps?&q=1000+Some+Street,+City,+NC+to+1000+Some+Other+Street,+City,+CA
That will open to Google maps and will automatically get directions.

Categories

Resources