Member-only story

Google Maps Add Marker Using Maps Javascript API and HTML

Bipsmedium
3 min readJul 12, 2022

--

Hi friends, in this tutorial, you will learn the example of Google Maps add marker using maps javascript API and HTML. As we all know a marker is usually a point of something but in this case marker identifies a particular location on the Google map and is also referred to as an icon. A marker is kind of an image of the standard size and object of the Marker constructor.

Nowadays, Google map plays an important role in building websites because everyone wants to track the live locations of their customers to acquire some valuable information about them and target those customers to grow their business.

Also read, Google places autocomplete example using maps JavaScript API

Properties of Google maps add marker using maps javascript API

In order to add a marker to the Google map, we have to pass some parameters in the Marker constructor by creating the marker object with the help of google. maps.Marker.

Below are the required parameters for the construction of the marker

marker.setMap(map);

HTML:-

<!DOCTYPE html> 
<html>
<head> <title>Add Map</title>
<link rel="stylesheet" type="text/css">
<style type="text/css">
#map
{ height: 400px;
/* The height is 400 pixels */
width: 60%;
/* The width is the width of the web page */
}
</style>
</head>
<body>
<h3>Google Map Marker for Guwahati Zoo…

--

--

Bipsmedium
Bipsmedium

Written by Bipsmedium

Hi, This is Biplab and I am a PHP laravel developer and other open source technologies. I am here to share my experience with the community.

No responses yet