JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<div class="easyui-layout" fit="true">
<div data-options="region:'north',title:'North Title',split:true" style="height:100px;"></div>
<div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>
<div data-options="region:'east',title:'East',split:true" style="width:100px;"></div>
<div data-options="region:'west',title:'West',split:true" style="width:100px;"></div>
<div id='map_canvas' data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div>
</div>
JavaScript
function createMap(mapDiv){
var gmap, locMarker, locCircle, locPath;
options = {
center: new google.maps.LatLng(-34.8, 138.6),
scaleControl: true,
zoom: 9,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: true,
navigationControl: true,
disableDoubleClickZoom: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.ZOOM_PAN
}
};
gmap = new google.maps.Map(mapDiv, options);
gmap.setOptions({
mapTypeControlOptions: {
mapTypeIds: [
google.maps.MapTypeId.ROADMAP,
google.maps.MapTypeId.TERRAIN,
google.maps.MapTypeId.SATELLITE,
google.maps.MapTypeId.HYBRID
]
}
});
locMarker = new google.maps.Marker({
position: new google.maps.LatLng(-34.8, 138.6),
map: gmap,
title: "A marker"
});
locCircle = new google.maps.Circle({
visible: true,
map: gmap,
radius: 5000,
center: new google.maps.LatLng(-34.6, 138.4),
fillColor: '#0055ff',
fillOpacity: 0.2,
strokeColor: '#0055ff',
strokeOpacity: 0.8,
strokeWeight: 1
});
var polyCoordinates = [
new google.maps.LatLng(-34.2, 138.0),
new google.maps.LatLng(-34.4, 138.1),
new google.maps.LatLng(-34.5, 138.3)
];
locPath = new google.maps.Polyline({
path: polyCoordinates,
strokeColor: "#0072BC",
strokeOpacity: 0.8,
strokeWeight: 5
});
locPath.setMap(gmap);
}
function addMap(){
createMap($('#map_canvas')[0]);
}
$(function(){
addMap();
});