#map_canvas { width: 95%; height: 370px; padding: 0px 10px 10px 10px; } ul#countryList li { padding: 2px 5px 2px 5px; margin: 2px 5px 2px 5px; } ul#countryList li.active { background-color: #e5e5e5; } div img.inl { display: inline; } #sitedetails { margin: 2px; padding: 0px; } div#googlebubble p{ padding-right: 5px; } .routeplanner .nolink { color: black!important; } .routeplanner .todiv { display: none; } .routeplanner p { padding-bottom: 0px!important; } var map = null; var moveMarker = null; var bns = null; var mapIsReady = false; var sBubbleTextNoSite = "Roche does not maintain an affiliate office in your Country.
Please contact our office: " var sHtmlBubbleTemplate = "

#SITE_TITLE#
#SITE_ADDRESS#

Route berechnen: Hierher - Von hier

Startaddresse


Zieladdresse


#SITE_LINKTEXT#


"; var sHtmlBubbleNoSiteTemplate = "

#SITE_TITLE#
#SITE_TEXT# #SITE_EMAIL#


"; var sHtmlBubbleSelectedSiteTemplate = "

#SITE_TITLE#
#SITE_ADDRESS#

Route berechnen: Hierher - Von hier

Startaddresse


Zieladdresse


"; function initialize() { if (GBrowserIsCompatible()) { //Set up mal and layout. Set CH as center map = new GMap2(document.getElementById("map_canvas")); var center = new GLatLng(46.73233, 8.45947); map.setCenter(center, 1); map.addControl(new GMapTypeControl()); map.addControl(new GLargeMapControl()); //Init vars bns = new GLatLngBounds(); mapIsReady = true; } } function getMarkersForCountry(iCId, iSId) { $.get("googlemap/googlemap-jsoninterface.ext", { action: "getsitesforcountry", countryid: iCId, selectedsiteid: iSId }, dataMarkersForCountr); } function dataMarkersForCountr(data) { var oData = eval ( data ); if (oData && oData.sites) { // order sites alphabetically oData.sites = oData.sites.sort(function(a, b) { var keyA = a.title.toUpperCase(); var keyB = b.title.toUpperCase(); if (keyA < keyB) return -1; if (keyA > keyB) return 1; return 0; }); var bFoundLoc = false; if (oData.sites.length > 0) { for (var iSite = 0; iSite < oData.sites.length; iSite++) { var site = oData.sites[iSite]; if (site.latitude && site.longitude) { var sHtmlBubble = ''; var bShowBubble = false; var sSpecialIcon = null; var oDomEle = new Object(); if (site.id == oData.request.selectedsiteid) { bShowBubble = true; sSpecialIcon = "blue"; bFoundLoc = true; //Zoom for single site map.setZoom(12); //map.setZoom(17); if (site.site_google_zoom && site.site_google_zoom > 0) { //alert("site.site_google_zoom: " + site.site_google_zoom) map.setZoom(site.site_google_zoom) } else { //alert("kein site zoom"); } map.setCenter(new GLatLng(site.latitude, site.longitude)); oDomEle.className = "active"; sHtmlBubble = sHtmlBubbleSelectedSiteTemplate; sHtmlBubble = sHtmlBubble.replace(/#SITE_TITLE#/g, site.title); sHtmlBubble = sHtmlBubble.replace(/#SITE_ADDRESS#/g, site.adr); } else { sHtmlBubble = sHtmlBubbleTemplate; sHtmlBubble = sHtmlBubble.replace(/#SITE_TITLE#/g, site.title); sHtmlBubble = sHtmlBubble.replace(/#SITE_ADDRESS#/g, site.adr); sHtmlBubble = sHtmlBubble.replace(/#SITE_URL#/g, "roche_worldwide-details.htm"); sHtmlBubble = sHtmlBubble.replace(/#SITE_ID#/g, site.id); sHtmlBubble = sHtmlBubble.replace(/#SITE_LINKTEXT#/g, "Click to see details"); } if (site.type != "site") { sHtmlBubble = sHtmlBubbleNoSiteTemplate; sHtmlBubble = sHtmlBubble.replace(/#SITE_TITLE#/g, site.title); sHtmlBubble = sHtmlBubble.replace(/#SITE_TEXT#/g, sBubbleTextNoSite); sHtmlBubble = sHtmlBubble.replace(/#SITE_EMAIL#/g, site.email_ref); } sHtmlBubble = sHtmlBubble.replace(/#LATITUDE#/g, site.latitude); sHtmlBubble = sHtmlBubble.replace(/#LONGITUDE#/g, site.longitude); AddMarkerAtPosition(site.latitude, site.longitude, sHtmlBubble, sSpecialIcon, bShowBubble); if (site.id != oData.request.selectedsiteid) { var sHtmlLink = "" if (site.title) { sHtmlLink = site.title; } var oLi = "
  • " + sHtmlLink + "
  • "; $('ul#countryList').append(oLi); } } } if (!bFoundLoc) { ZoomMapToShowAllPoints(); } } else { $("othersitesincountry").hide(); } } } function AddMarkerAtPosition(lat, lng, txt, spec, bShowBubble) { var icoW = 32; var icoH = 32; var icoUrl = "http://images.google.com/intl/en_ALL/mapfiles/ms/icons/red-dot.png"; //var icoUrl = "red-dot.gif"; if (isNaN(parseInt(spec))) switch (spec) { case "blue": icoW = 32; icoH = 32; icoUrl = "http://images.google.com/intl/en_ALL/mapfiles/ms/icons/blue-dot.png"; //icoUrl = "blue-dot.gif"; break; default: //icoUrl = "http://www.danysan.com/gennamedmarker?txt="+spec; break; } else if (parseInt(spec) > 0) { icoW = 20; icoH = 34; icoUrl = "http://gmaps-samples.googlecode.com/svn/trunk/markers/green/marker"+spec+".png"; } var ico = GetGIcon(icoW, icoH, icoUrl); var pt = new GLatLng(lat, lng); var mk = new GMarker(pt, { icon:ico }); map.addOverlay(mk); bns.extend(pt); GEvent.addListener(mk, "click", function() { mk.openInfoWindowHtml(txt); }); if (bShowBubble) { mk.openInfoWindowHtml(txt); } } //tried modifying the links after they were created (onOpenFn, timeout) without success on IE. //opted for a crude but robust method instead. function initFrom() { $('.routeplanner .fromhere').addClass('nolink'); $('.routeplanner .tohere').removeClass('nolink'); $('.routeplanner .fromdiv').hide(); $('.routeplanner .todiv').show(); return false; } function initTo() { $('.routeplanner .tohere').addClass('nolink'); $('.routeplanner .fromhere').removeClass('nolink'); $('.routeplanner .todiv').hide(); $('.routeplanner .fromdiv').show(); return false; } function GetGIcon(w, h, imgUrl) { var iUr = imgUrl || "http://www.google.com/mapfiles/marker.png"; var gIco = new GIcon(); gIco.shadow = "http://www.google.com/mapfiles/shadow50.png"; gIco.iconSize = new GSize(w, h); gIco.shadowSize = new GSize(w*2, h); gIco.iconAnchor = new GPoint(w/2, h); gIco.infoWindowAnchor = new GPoint(w/2, 2); gIco.infoShadowAnchor = new GPoint(w/2, 2); var spIcon = new GIcon(gIco); spIcon.image = iUr; return spIcon; } function ZoomMapToShowAllPoints() { if (map.getBoundsZoomLevel(bns) > 13) { map.setZoom(13); } else { map.setZoom(map.getBoundsZoomLevel(bns)); } map.setCenter(bns.getCenter()); }

    Sorry but Javascript is dissabled on this browser. Please activate Javascript to see the googlemaps.