JSFiddle - React, Tailwind, and code Playground
by Atma Tecnologia
HTML
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<div id="map-canvas"></div>
CSS
#map-canvas
{
height: 400px;
width: 500px;
}
JavaScript
function initialize() {
var myLatLng = new google.maps.LatLng( -15.8511490,-48.9588740 ),
myOptions = {
zoom: 8,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map( document.getElementById( 'map-canvas' ), myOptions );
var image = 'https://cdn1.iconfinder.com/data/icons/gpsmapicons/blue/gpsmapicons01.png';
var marker1 = new google.maps.Marker({
position: myLatLng,
map: map,
icon: {
url: image,
size: new google.maps.Size(134,130), //different sizes
},
zIndex: 2, //different overlays
title: '1º marker',
});
var marker2 = new google.maps.Marker({
position: myLatLng,
map: map,
icon: {
url: image,
size: new google.maps.Size(154,150),//different sizes
},
zIndex: 1, //different overlays
title: '2º marker',
});
};
initialize();