JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css">
<title>Test Map</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script>
//define dialog
$(function() {
$('#dialog-sw-canvas').dialog({
title: 'Street View',
width: 400,
height: 400,
closed: true,
cache: false,
modal: true,
onClose: function() {
$('#dialog-sw-canvas').empty();
}
});
$('#dialog-sw-canvas').dialog('close');
});
//Default to GEOSS
var client_lat = 46.119944;
var client_lon = 14.815333;
var map;
var panoramaOptions;
var panorama;
//var sv = new google.maps.StreetViewService();
function initialize() {
map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: 8,
center: new google.maps.LatLng(client_lat, client_lon),
streetViewControl: false
});
// Icons
var iconBase = 'https://maps.google.com/mapfiles/kml/pal2/';
var icons = {
hq: {
name: 'HQ',
icon: iconBase + 'icon2.png'
},
shop: {
name: 'Shop',
icon: iconBase + 'icon10.png'
}
};
//Create Map markers
function addMarker(feature) {
var marker = new google.maps.Marker({
position: feature.position,
icon: icons[feature.type].icon,
map: map
});
//Create Infowindow
var infowindow = new google.maps.InfoWindow();
var content = '<h1 id="Heading" class="Heading">' +...
CSS
html, body, #map-canvas {
margin: 0;
padding: 0;
//width: 1024px;
//height: 768px;
height: 100%;
}
#legend {
font-family: Arial, sans-serif;
background: #fff;
padding: 10px;
margin: 10px;
border: 3px solid #000;
}
#legend h3 {
margin-top: 0;
}
#legend img {
vertical-align: middle;
}