0% found this document useful (0 votes)
9 views2 pages

Map Basic

The script initializes a Google Map centered at specific coordinates with a satellite view and adds an OpenStreetMap layer. It includes functionality to adjust z-index values of elements on the page at regular intervals. The map is displayed in a div with specified dimensions.

Uploaded by

Lâm Trần
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Map Basic

The script initializes a Google Map centered at specific coordinates with a satellite view and adds an OpenStreetMap layer. It includes functionality to adjust z-index values of elements on the page at regular intervals. The map is displayed in a div with specified dimensions.

Uploaded by

Lâm Trần
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

<script>

function initMap() {
var mapOptions = {
center: new [Link](10.981394337457573,
106.66727659812716),
zoom: 18,
mapTypeId: [Link]
//mapTypeId:[Link]
//mapTypeId: "OSM",
}

var mapTypeIds = [];


for (var type in [Link]) {
[Link]([Link][type]);
}
[Link]("OSM");

map = new [Link]([Link]('myMap'), mapOptions)

[Link]("OSM", new [Link]({


getTileUrl: function (coord, zoom) {
// See above example if you need smooth wrapping at 180th meridian
return "[Link] + zoom + "/" + coord.x +
"/" + coord.y + ".png";
},
tileSize: new [Link](256, 256),
name: "OpenStreetMap",
maxZoom: 18
}))

[Link](window, 'load', initMap)

[Link] = function () {

addEvent();
addAnimate()

/*
tat cac hình For Deverloper
*/

setInterval(function () {
$("*").each(function () {
if ($(this).css("zIndex") == 100) {
$(this).css("zIndex", "-100");
}
})
}
, 10);
}

</script>

<body>
<div id="myMap" style="width:100%;height:500px"></div>
</body>

You might also like