JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&dummy=.js"></script>
<script src="http://www.msg360.co.uk/emails/sample/Scripts/infobubble-compiled.js"></script>
<div id="map_canvas" style="width:920px; height:370px"></div>
<button id="mp0">111</button>
<button id="mp1">222</button>
<button id="mp2">333</button>
<button id="mp3">444</button>
<button onclick="zoomOut()">-</button>
<button onclick="zoomIn()">+</button>
CSS
.example{
color:#ffffff;
}
JavaScript
var map;
var geocoder;
var query = new Array( 'Челябинск, ул. Богдана-хмельницкого, д. 27', 'Челябинск, ул. Кирова, д. 86', 'Челябинск, ул. Кирова, д. 112', 'Челябинск, ул. Кирова, д. 10');
var idArr = new Array("mp0", "mp1", "mp2", "mp3");
var arrContent = new Array('<div class="info__phone">+7 (351) 777-11-50</div><div class="info__address">Челябинск, ул. Кирова, д. 86 <br> [email protected]</div>', '<div class="info__phone">+7 (351) 777-11-50</div><div class="info__address">Челябинск, ул. Кирова, д. 86 <br> [email protected]</div>', '<div class="info__phone">+7 (351) 777-11-50</div><div class="info__address">Челябинск, ул. Кирова, д. 112 <br> [email protected]</div>', '<div class="info__phone">+7 (351) 777-11-50</div><div class="info__address">Челябинск, ул. Кирова, д. 112 <br> [email protected]</div>');
init();
function init() {
geocoder = new google.maps.Geocoder();
//Setup the map
var googleMapOptions = {
center: new google.maps.LatLng(53.5167, -1.1333),
zoom: 15,
sensor:'true',
disableDefaultUI:true,
scrollwheel:false,
styles:[
{"stylers":[
{"saturation":-100},
{"gamma":1}
]},
{"elementType":"labels.text.stroke", "stylers":[
{"visibility":"off"}
]},
{"featureType":"poi.business", "elementType":"labels.text", "stylers":[
{"visibility":"off"}
]},
{"featureType":"poi.business", "elementType":"labels.icon", "stylers":[
{"visibility":"off"}
]},
{"featureType":"poi.place_of_worship", "elementType":"labels.text", "stylers":[
{"visibility":"off"}
]},
...