You can also mark the specific location in google maps using the
new google.maps.Marker() function object. You just pass the position, map location, and title for mouseover.
Follow the below steps to get the google maps API key. I will show you each step with the help of images, so you can easily understand.
- First of all, login to your google account and go to Google Developer Console
- Click on the “Select Project” option at top header see the following image as reference.
- Now you will see a popup box, so click on the “New Project” button. If you have existing project then you can select them to get the API key.
- It will redirect you new page. Enter here your project name and select any organization and then click on the “Create” button.
- Now navigate to “Credential” menu from left side and then click on the “+ Create Credentials” button and select API key.
Now your google maps API is ready to use. You just have to pass this API key in the script source as a query parameter.
So set the
key parameter with API key as a value in the script source and add this script into your header or footer of the website.
Embed this script in your website and then you can use google maps on your website and customize it according to documentation.