Last active
August 29, 2015 14:17
-
-
Save keeprock/cf0c8fe2e6a05e6602ec to your computer and use it in GitHub Desktop.
Google Map falling pointers Code need to be checked
http://moscow-krd.ru/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li class="something" onclick="initialize_ban()"><span>Банки</span></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var speed_down_label = 200; | |
//Detsad | |
function initialize_det() { | |
var mapOptions = { | |
zoom: 15, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0612273,39.0211964) | |
} | |
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); setMarkers_det(map, labels); | |
} | |
var labels = [ | |
['ЖК Москва', 45.0599100,39.0161975, 0], | |
['Детский сад № 143,ул. 40 лет Победы, 29/17', 45.055336,39.005292, 1], | |
['Детский сад № 90, Выставочная ул., 16', 45.053945,39.000178, 2], | |
['Детский Сад n90 город Краснодар', 45.053544,38.999556, 3], | |
['Детский Сад n40', 45.0583009,39.0035625, 4], | |
['Детский Сад № 147', 45.056097,39.001427, 5], | |
['Детский сад № 1, комбинированного вида,Российская ул., 100', 45.056747,39.018912, 6], | |
]; | |
function setMarkers_det(map, locations) { | |
var image_main = { | |
url: '/images/label_map_main.png', | |
size: new google.maps.Size(152, 68), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(75, 44) | |
}; | |
var image = { | |
url: '/images/label_map.png', | |
size: new google.maps.Size(25, 23), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(12, 30) | |
}; | |
var i = 0; | |
var label; | |
var myLatLng; | |
var show_labels = setInterval(function () { | |
label = labels[i]; | |
myLatLng = new google.maps.LatLng(label[1], label[2]); | |
if (i == 0) { | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng, | |
map: map, | |
icon: image_main, | |
title: label[0], | |
zIndex: label[3] | |
}); | |
google.maps.event.addListener(marker, 'click', function() { | |
window.location = '/about'; | |
}); | |
} | |
else{ | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng, | |
map: map, | |
icon: image, | |
title: label[0], | |
zIndex: label[3] | |
}); | |
} | |
i++; | |
if (i == labels.length) { | |
clearInterval(show_labels); | |
} | |
}, speed_down_label); | |
} | |
//Fitnes | |
function initialize_fit() { | |
var mapOptions_fit = { | |
zoom: 15, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0612273,39.0176764) | |
} | |
var map_fit = new google.maps.Map(document.getElementById('map-canvas'), mapOptions_fit); setMarkers_fit(map_fit, labels_fit); | |
} | |
var labels_fit = [ | |
['ЖК Москва', 45.0599100,39.0161975, 0], | |
['Бриз ул. 40 лет Победы, 33/7', 45.057465,39.008525, 1], | |
['Prowellness ул. 40 лет Победы, 33/7', 45.057557,39.008868, 2], | |
['Fitness Land Зиповская ул., 24/2', 45.0611663,39.0064249, 3], | |
['Элит-Лайн ул. Зиповская, 24/2', 45.061072,39.006032, 4], | |
['Женский Фитнес Зал 1 Мая ул., 93', 45.052828, 39.022749, 5], | |
['Гелиос, спортивный клуб 49, ул. Восточно-Кругликовка,', 45.059914,39.025128, 6] | |
]; | |
function setMarkers_fit(map_fit, locations_fit) { | |
var image_main_fit = { | |
url: '/images/label_map_main.png', | |
size: new google.maps.Size(152, 68), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(75, 44) | |
}; | |
var image_fit = { | |
url: '/images/label_map.png', | |
size: new google.maps.Size(25, 23), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(12, 30) | |
}; | |
var i = 0; | |
var label_fit; | |
var myLatLng_fit; | |
var show_labels_fit = setInterval(function () { | |
label_fit = labels_fit[i]; | |
myLatLng_fit = new google.maps.LatLng(label_fit[1], label_fit[2]); | |
if (i == 0) { | |
var marker_fit = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_fit, | |
map: map_fit, | |
icon: image_main_fit, | |
title: label_fit[0], | |
zIndex: label_fit[3] | |
}); | |
google.maps.event.addListener(marker_fit, 'click', function() { | |
window.location = '/about'; | |
}); | |
} | |
else{ | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_fit, | |
map: map_fit, | |
icon: image_fit, | |
title: label_fit[0], | |
zIndex: label_fit[3] | |
}); | |
} | |
i++; | |
if (i == labels_fit.length) { | |
clearInterval(show_labels_fit); | |
} | |
}, speed_down_label); | |
} | |
//Schools | |
function initialize_sch() { | |
var mapOptions_sch = { | |
zoom: 14, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0559896,39.0189261) | |
} | |
var map_sch = new google.maps.Map(document.getElementById('map-canvas'), mapOptions_sch); setMarkers_sch(map_sch, labels_sch); | |
} | |
var labels_sch = [ | |
['ЖК Москва', 45.0599100,39.0161975, 0], | |
['Школа-Гимназия n78', 45.052553,39.006138, 1], | |
['Средняя Общеобразовательная Школа № 78, МОУ Ростовская ул., 14', 45.052406,39.00623, 2], | |
['Краснодарская школа иностранных языков ул. Достоевского, 84/1',45.0533409,39.0164196, 3], | |
['МБОУ СОШ № 47 ул. Садовая, 245', 45.050573,38.996781, 4], | |
['Школа при Профессиональном Училице № 68',45.0686713,39.0234247, 6], | |
['Краснодарский колледж электронного приборостроения ул. Зиповская, 7', 45.062862,38.998224, 7], | |
['Академия Маркетинга И Социально-Информационных Технологий ул. Ленина, 52', 45.063151,38.994826, 8], | |
['Краснодарский Государственный Университет Культуры И Искусств ул. 40 лет Победы, 33', 45.057225,39.007811, 9], | |
['КАСТ, Краснодарский архитектурно-строительный техникум Российская ул., 132', 45.05992,39.017923, 10], | |
['Школа №93, 1 Мая ул., 93', 45.053189,39.022642, 11], | |
['Средняя Общеобразовательная Школа № 11, МОУ,Российская ул., 10', 45.046392,39.019831, 12], | |
['Средняя Общеобразовательная Школа № 5, ул. Котовского, 100', 45.055675,38.964764, 13] | |
]; | |
function setMarkers_sch(map_sch, locations_sch) { | |
var image_main_sch = { | |
url: '/images/label_map_main.png', | |
size: new google.maps.Size(152, 68), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(75, 44) | |
}; | |
var image_sch = { | |
url: '/images/label_map.png', | |
size: new google.maps.Size(25, 23), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(12, 30) | |
}; | |
var i = 0; | |
var label_sch; | |
var myLatLng_sch; | |
var show_labels_sch = setInterval(function () { | |
label_sch = labels_sch[i]; | |
myLatLng_sch = new google.maps.LatLng(label_sch[1], label_sch[2]); | |
if (i == 0) { | |
var marker_sch = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_sch, | |
map: map_sch, | |
icon: image_main_sch, | |
title: label_sch[0], | |
zIndex: label_sch[3] | |
}); | |
google.maps.event.addListener(marker_sch, 'click', function() { | |
window.location = '/about'; | |
}); | |
} | |
else{ | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_sch, | |
map: map_sch, | |
icon: image_sch, | |
title: label_sch[0], | |
zIndex: label_sch[3] | |
}); | |
} | |
i++; | |
if (i == labels_sch.length) { | |
clearInterval(show_labels_sch); | |
} | |
}, speed_down_label); | |
} | |
//Medical | |
function initialize_med() { | |
var mapOptions_med = { | |
zoom: 15, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0612273,39.0176764) | |
} | |
var map_med = new google.maps.Map(document.getElementById('map-canvas'), mapOptions_med); setMarkers_med(map_med, labels_med); | |
} | |
var labels_med = [ | |
['ЖК Москва', 45.0599100,39.0161975, 0], | |
['УРО-ПРО, медицинский центр, ООО Армавирская ул., 60', 45.053569,39.008545, 1], | |
['Медико-биологический центр ТОЦ "Оскар", 3 этаж ул. 40 лет Победы, 34,', 45.054757,39.003778, 2], | |
['ЗимаMed Московская ул., 40', 45.056698,39.0031, 3], | |
['Краевая Клиническая Больница № 1,1 Мая ул., 167', 45.063667,39.019696, 4], | |
['Детская Краевая Клиническая Больница, ГУЗ пл. Победы, 1', 45.055921,39.017023, 5], | |
]; | |
function setMarkers_med(map_med, locations_med) { | |
var image_main_med = { | |
url: '/images/label_map_main.png', | |
size: new google.maps.Size(152, 68), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(75, 44) | |
}; | |
var image_med = { | |
url: '/images/label_map.png', | |
size: new google.maps.Size(25, 23), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(12, 30) | |
}; | |
var i = 0; | |
var label_med; | |
var myLatLng_med; | |
var show_labels_med = setInterval(function () { | |
label_med = labels_med[i]; | |
myLatLng_med = new google.maps.LatLng(label_med[1], label_med[2]); | |
if (i == 0) { | |
var marker_med = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_med, | |
map: map_med, | |
icon: image_main_med, | |
title: label_med[0], | |
zIndex: label_med[3] | |
}); | |
google.maps.event.addListener(marker_med, 'click', function() { | |
window.location = '/about'; | |
}); | |
} | |
else{ | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_med, | |
map: map_med, | |
icon: image_med, | |
title: label_med[0], | |
zIndex: label_med[3] | |
}); | |
} | |
i++; | |
if (i == labels_med.length) { | |
clearInterval(show_labels_med); | |
} | |
}, speed_down_label); | |
} | |
//Magazin | |
function initialize_mag() { | |
var mapOptions_mag = { | |
zoom: 15, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0560432,39.0192112) | |
} | |
var map_mag = new google.maps.Map(document.getElementById('map-canvas'), mapOptions_mag); setMarkers_mag(map_mag, labels_mag); | |
} | |
var labels_mag = [ | |
['ЖК Москва', 45.0599100,39.0161975, 0], | |
['Торговый центр ул. 40 лет Победы, 33/1', 45.056102,39.008969, 1], | |
['ОСКАР, торгово-офисный центр, ООО ул. 40-летия Победы, 34', 45.054755,39.003785, 2], | |
['Муравей, Тд, ЗАО Российская ул., 71', 45.05471,39.016643, 3], | |
['Гран, ТК Крайняя ул.', 45.05068,39.003219, 4], | |
['Табрис ул. 40 лет Победы, 144/5', 45.0554141,39.0193454, 5], | |
['Магнит Российская ул., 79/1', 45.0598667,39.0180525, 6], | |
['Магнит, сеть супермаркетов Восточно-Кругликовская ул., 48', 45.0597795,39.0251765, 7] | |
]; | |
function setMarkers_mag(map_mag, locations_mag) { | |
var image_main_mag = { | |
url: '/images/label_map_main.png', | |
size: new google.maps.Size(152, 68), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(75, 44) | |
}; | |
var image_mag = { | |
url: '/images/label_map.png', | |
size: new google.maps.Size(25, 23), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(12, 30) | |
}; | |
var i = 0; | |
var label_mag; | |
var myLatLng_mag; | |
var show_labels_mag = setInterval(function () { | |
label_mag = labels_mag[i]; | |
myLatLng_mag = new google.maps.LatLng(label_mag[1], label_mag[2]); | |
if (i == 0) { | |
var marker_mag = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_mag, | |
map: map_mag, | |
icon: image_main_mag, | |
title: label_mag[0], | |
zIndex: label_mag[3] | |
}); | |
google.maps.event.addListener(marker_mag, 'click', function() { | |
window.location = '/about'; | |
}); | |
} | |
else{ | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_mag, | |
map: map_mag, | |
icon: image_mag, | |
title: label_mag[0], | |
zIndex: label_mag[3] | |
}); | |
} | |
i++; | |
if (i == labels_mag.length) { | |
clearInterval(show_labels_mag); | |
} | |
}, speed_down_label); | |
} | |
//Banks | |
function initialize_ban() { | |
var mapOptions_ban = { | |
zoom: 15, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0612273,39.0176764) | |
} | |
var map_ban = new google.maps.Map(document.getElementById('map-canvas'), mapOptions_ban); setMarkers_ban(map_ban, labels_ban); | |
} | |
var labels_ban = [ | |
['ЖК Москва', 45.0599100,39.0161975, 0], | |
['Альфа-Банк Ростовское ш., 28', 45.09472, 38.992492, 1], | |
['Сбербанк России Зиповская ул., 24', 45.0624721, 39.0059289, 2], | |
['Кубань Кредит Восточно-Кругликовская ул., 46/12', 45.0577983, 39.0255789, 3], | |
['Крайинвестбанк ул. 40 лет Победы, 146', 45.0556442, 39.0208917, 4], | |
['УРАЛСИБ ул. 40 лет Победы, 43', 45.0561239, 39.016055, 5] | |
]; | |
function setMarkers_ban(map_ban, locations_ban) { | |
var image_main_ban = { | |
url: '/images/label_map_main.png', | |
size: new google.maps.Size(152, 68), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(75, 44) | |
}; | |
var image_ban = { | |
url: '/images/label_map.png', | |
size: new google.maps.Size(25, 23), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(12, 30) | |
}; | |
var i = 0; | |
var label_ban; | |
var myLatLng_ban; | |
var show_labels_ban = setInterval(function () { | |
label_ban = labels_ban[i]; | |
myLatLng_ban = new google.maps.LatLng(label_ban[1], label_ban[2]); | |
if (i == 0) { | |
var marker_ban = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_ban, | |
map: map_ban, | |
icon: image_main_ban, | |
title: label_ban[0], | |
zIndex: label_ban[3] | |
}); | |
google.maps.event.addListener(marker_ban, 'click', function() { | |
window.location = '/about'; | |
}); | |
} | |
else{ | |
var marker = new google.maps.Marker({ | |
animation: google.maps.Animation.DROP, | |
position: myLatLng_ban, | |
map: map_ban, | |
icon: image_ban, | |
title: label_ban[0], | |
zIndex: label_ban[3] | |
}); | |
} | |
i++; | |
if (i == labels_ban.length) { | |
clearInterval(show_labels_ban); | |
} | |
}, speed_down_label); | |
} | |
google.maps.event.addDomListener(window, 'load', initialize_det); | |
function initialize() { | |
var mapOptions = { | |
zoom: 17, | |
scrollwheel:false, | |
center: new google.maps.LatLng(45.0600000,39.0182070) | |
} | |
var map = new google.maps.Map(document.getElementById('map-office'), mapOptions); | |
var image = '/images/label_map_main_office.png'; | |
var myLatLng = new google.maps.LatLng(45.0597000,39.0165070); | |
var beachMarker = new google.maps.Marker({ | |
position: myLatLng, | |
map: map, | |
size: new google.maps.Size(152, 156), | |
origin: new google.maps.Point(0,0), | |
anchor: new google.maps.Point(0, 0), | |
icon: image | |
}); | |
} | |
google.maps.event.addDomListener(window, 'load', initialize); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment