﻿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,14);

// 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>Sofia 1680</b><br /> 55 Gotse Delchev blv. <br />tel: +359 02/818 25 55 <br />fax: +359 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>Sofia 1164</b><br/>26 Tsanko Tserkovski str.<br />tel: +359 02/963 35 55 <br />fax: 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>Plovdiv 4000</b><br/>31 Bogomil str.<br/>tel.: +359 032/27 50 55<br/>fax: +359 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>Plovdiv 4000</b><br/>6 Angel Bukureshtliev str.<br/>tel.: +359 032/27 50 55<br/>fax: +359 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>Pazardzhik 4400</b><br/>1 Ekzarh Yosif str.<br/>tel: +359 034/40 55 55<br/>fax: +359 034/40 55 56<br/>email: <a href='mailto:info_pz@zenitgeo.com'>info_pz@zenitgeo.com</a><br /></div>");
chpl_m.setInfoBubble("<b>Chepelare</b><br/>tel.: +359 03051/35 501");
pernik_m.setInfoBubble("<b>Pernik</b><br/>tel.: +359 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();

