﻿var mapstraction = new Mapstraction('mapstraction','google');
mapstraction.maps['google'].enableScrollWheelZoom();
mapstraction.addControls({ pan: true, zoom: 'small', overview: false, scale: true, map_type: true });


// create a lat/lon object
var sofia = new LatLonPoint(42.686527,23.31215);
var sofia1 = new LatLonPoint(42.674808,23.290892); //sofia-gotze del4ev
var sofia2 = new LatLonPoint(42.681776,23.332852); //sofia-tzanko tzerkovski
var plovdivcenter = new LatLonPoint(42.143829,24.749622);
var plovdiv = new LatLonPoint(42.139887,24.757256);
var plovdiv2 = new LatLonPoint(42.146966,24.747529);
var pz = new LatLonPoint(42.1889,24.3316);
var chpl = new LatLonPoint(41.725974,24.684648);
var pernik = new LatLonPoint(42.606042,23.031120);

// display the map centered on a latitude and longitude (Google zoom levels)

mapstraction.setCenterAndZoom(sofia,13);

// create a marker positioned at a lat/lon 
sofia1_m = new Marker(sofia1);
sofia2_m = new Marker(sofia2);
plovdiv_m = new Marker(plovdiv);
plovdiv2_m = new Marker(plovdiv2);
pz_m = new Marker(pz);
chpl_m = new Marker(chpl);
pernik_m = new Marker(pernik);

sofia1_m.setIcon('tl_files/images/pushpin.png');
sofia2_m.setIcon('tl_files/images/pushpin.png');
plovdiv_m.setIcon('tl_files/images/pushpin.png');
plovdiv2_m.setIcon('tl_files/images/pushpin.png');
pz_m.setIcon('tl_files/images/pushpin.png');
chpl_m.setIcon('tl_files/images/pushpin.png');
pernik_m.setIcon('tl_files/images/pushpin.png');

// add info bubble to the marker
sofia1_m.setInfoBubble("<div id='bubble'><b>София 1680</b><br />бул. Гоце Делчев 55 <br />тел: 02/818 25 55 <br />факс: 02/818 25 56 <br />email: <a href='mailto:info_sf@zenitgeo.com'>info_sf@zenitgeo.com</a><br /></div>");
sofia2_m.setInfoBubble("<div id='bubble'><b>София 1164</b><br/>ул.Цанко Церковски 26 <br />тел: 02/963 35 55 <br />факс: 02/963 35 55 <br />email: <a href='mailto:info_sf@zenitgeo.com'>info_sf@zenitgeo.com</a><br /></div>");
plovdiv_m.setInfoBubble("<div id='bubble'><b>Пловдив 4000</b><br/>ул.Богомил 31<br/>тел.: 032/27 50 55<br/>факс: 032/27 50 56<br/>email: <a href='mailto:info_pl@zenitgeo.com'>info_pl@zenitgeo.com</a><br /></div>");
plovdiv2_m.setInfoBubble("<div id='bubble'><b>Пловдив 4000</b><br/>ул.Ангел Букурещлиев 6<br/>тел.: 032/27 50 55<br/>факс: 032/27 50 56<br/>email: <a href='mailto:info_pl@zenitgeo.com'>info_pl@zenitgeo.com</a><br /></div>");
pz_m.setInfoBubble("<div id='bubble'><b>Пазарджик 4400</b><br/>ул.Екзарх Йосиф 1<br/>тел:034/40 55 55<br/>факс: 034/40 55 56<br/>email: <a href='mailto:info_pz@zenitgeo.com'>info_pz@zenitgeo.com</a><br /></div>");
chpl_m.setInfoBubble("<b>Чепеларе</b><br/>тел.: 03051/35 501");
pernik_m.setInfoBubble("<b>Перник</b><br/>тел.: 076/60 54 69");
// display marker 
mapstraction.addMarker(sofia1_m);
mapstraction.addMarker(sofia2_m);
mapstraction.addMarker(plovdiv_m);
mapstraction.addMarker(plovdiv2_m);
mapstraction.addMarker(pz_m);
mapstraction.addMarker(chpl_m);
mapstraction.addMarker(pernik_m);

// open the marker
sofia1_m.openBubble();

