/** * String URL encodieren * Quelle: http://www.thegeek.de/blog/type/archiv/post/200505.html#geek63 */ function urlencode_string( estring ) { hex = '0123456789ABCDEF'; encString = ''; e_char = ''; e_len = estring.length; for( e_i = 0; e_i < e_len; e_i++ ) { e_char = parseInt( estring.charCodeAt( e_i ) ); encString += '%' + hex.charAt( (e_char >> 4) % 16 ) + hex.charAt( e_char % 16 ); } return encString; } /** * String URL encodieren * Angepasst von: Michael Reichenbach, */ function urlencode_string_plus( estring ) { var encString = encodeURIComponent(estring); return encString.replace(/%20/g, '+'); } var map = null; var geocoder = null; var position = null; var tiny = null; var hotIcon = null; var fav_icon = null; var attract = null; var position_adresse = ""; var line = null; var circleline = null; var circleline2 = null; var page = 1; // aktuelle page fuer menue_pager var options = new Array(); var locations = new Array(); var restaurant_id_to_location_index = new Array(); var MY_MODE = 'loc'; var city = ''; var tag_names = 'spielplatz'; var is_jena = '0'; var is_large_map = 'y'; /** * Quelle: http://www.econym.demon.co.uk/googlemaps/basic14.htm */ var bounds = null; var ew = null; function load() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); geocoder = new GClientGeocoder(); var center = new GLatLng(50.926383, 11.585212); // set current map view map.setCenter(center, getMyZoom(15)); // position und zoom // add controls to map if (is_large_map == 'y') { map.addControl(new GLargeMapControl()); // overview var ovSize = new GSize(150, 100); var ovMap = new GOverviewMapControl(ovSize); map.addControl(ovMap); var mini = ovMap.getOverviewMap(); ovMap.hide(); var pos; var smallMapControl = document.getElementById("smallMapControl"); smallMapControl.style.display = 'block'; pos = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(1,1)); pos.apply(smallMapControl); map.getContainer().appendChild(smallMapControl); var noRestaurantsControl = document.getElementById("noRestaurantsControl"); pos = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,10)); pos.apply(noRestaurantsControl); map.getContainer().appendChild(noRestaurantsControl); } else { map.addControl(new GSmallMapControl()); var largeMapControl = document.getElementById("largeMapControl"); largeMapControl.style.display = 'block'; var pos = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(1,1)); pos.apply(largeMapControl); map.getContainer().appendChild(largeMapControl); } //map.addControl(new GMapTypeControl()); //map.addControl(new GScaleControl(300)); map.hideControls(); GEvent.addListener(map, "mouseover", function(){ map.showControls(); }); GEvent.addListener(map, "mouseout", function(){ map.hideControls(); }); /** GEvent.addListener(map, 'click', function(marker, point){ if (point) { hideInfo(); } }); **/ // tiny marker icons tiny = new GIcon(); tiny.image = "/images/mm_20_blue.png"; tiny.shadow = "/images/mm_20_shadow.png"; tiny.iconSize = new GSize(12, 20); tiny.shadowSize = new GSize(22, 20); tiny.iconAnchor = new GPoint(6, 20); tiny.infoWindowAnchor = new GPoint(5, 1); hotIcon = new GIcon(); hotIcon.image = "/images/mm_20_red.png"; hotIcon.shadow = "/images/mm_20_shadow.png"; hotIcon.iconSize = new GSize(12, 20); hotIcon.shadowSize = new GSize(22, 20); hotIcon.iconAnchor = new GPoint(6, 20); hotIcon.infoWindowAnchor = new GPoint(5, 1); whiteIcon = new GIcon(); whiteIcon.image = "/images/mm_20_blue.png"; whiteIcon.shadow = "/images/mm_20_shadow.png"; whiteIcon.iconSize = new GSize(12, 20); whiteIcon.shadowSize = new GSize(22, 20); whiteIcon.iconAnchor = new GPoint(6, 20); whiteIcon.infoWindowAnchor = new GPoint(5, 1); fav_icon = new GIcon(); fav_icon.image = "/images/mm_20_blue_star.png"; fav_icon.shadow = "/images/mm_20_shadow.png"; fav_icon.iconSize = new GSize(12, 20); fav_icon.shadowSize = new GSize(22, 20); fav_icon.iconAnchor = new GPoint(6, 20); fav_icon.infoWindowAnchor = new GPoint(5, 1); } else { alert("Ihr Browser unterstuetzt die Google Map API nicht!"); } } function addInfoWindow(pinNumber, html) { //html = '
Drei-Bezirks-Eck

Hier stoßen Kreuzberg, Treptow und Neukölln zusammen.

'; html = '
' + html + '
'; return GEvent.addListener(locations[pinNumber]['marker'], 'click', function(){ locations[pinNumber]['marker'].openInfoWindowHtml(html, {maxWidth:350}); }); } function addInfoWindow5(pinNumber, html) { var my_html = '
Restaurant-Informationen' + '' + '
' + '
' + html + '
'; return GEvent.addListener(locations[pinNumber]['marker'], 'click', function(){ var obj = document.getElementById('mapInfo'); if (obj) { obj.innerHTML = my_html; obj.style.display = 'block'; } }); } function addInfoWindow6(pinNumber, title, html) { //var my_html = '
' var my_html = '
' + '
' + title + '
' + '' + '
' + '
' + html + '
'; return GEvent.addListener(locations[pinNumber]['marker'], 'click', function(){ var obj = document.getElementById('mapInfo'); if (obj) { obj.innerHTML = my_html; obj.style.display = 'block'; } }); } function addInfoWindowTabs(pin, tabs) { return GEvent.addListener(pin, 'click', function(){ pin.openInfoWindowTabsHtml(tabs, {maxWidth:300, selectedTab:1}); }); } function addInfoWindowTabs2(pinNumber) { return GEvent.addListener(locations[pinNumber]['marker'], 'click', function(){ var tabs = [ new GInfoWindowTab('Restaurant', locations[pinNumber]['restaurant_html']), new GInfoWindowTab('Menue', locations[pinNumber]['menue_html']) ]; locations[pinNumber]['marker'].openInfoWindowTabsHtml(tabs, {maxWidth:300, selectedTab:1}); }); } function addInfoWindowTabs3(pinNumber) { return GEvent.addListener(locations[pinNumber]['marker'], 'click', function(){ var tabs = new Array(); tabs[0] = new GInfoWindowTab('Restaurant', locations[pinNumber]['restaurant_html']); if (locations[pinNumber]['active_menue'] > -1) { tabs[1] = new GInfoWindowTab('Menue', locations[pinNumber]['menues'][locations[pinNumber]['active_menue']]['menue_html']); locations[pinNumber]['marker'].openInfoWindowTabsHtml(tabs, {maxWidth:300, selectedTab:1}); } else { locations[pinNumber]['marker'].openInfoWindowTabsHtml(tabs, {maxWidth:300, selectedTab:0}); } }); } parseFileTmp = function(doku) { } function showAddress(address) { showElement('indicator'); var tmp_address = address; if ((address.toLowerCase().indexOf("germany") == -1) && (address.toLowerCase().indexOf("deutschland") == -1)) { address += ", Deutschland"; } position_adresse = address; if (geocoder) { geocoder.getLatLng( address, function(point) { /** * Statistik hinterlegen */ GDownloadUrl('/stats.php?address='+encodeURIComponent(tmp_address)+"&radius="+encodeURIComponent(document.getElementById("radius").value), parseFileTmp); if (!point) { //document.getElementById("result_pager").innerHTML = ' keine Restaurants gefunden

Tipp: Vergrössern Sie den Suchradius (klicken Sie dazu auf "Suchoptionen")

Gibt es hier ein Restaurant welches wir noch nicht gelistet haben? Teilen Sie es uns mit!
'; document.getElementById("result_pager").innerHTML = ' keine Restaurants gefunden

Tipp: Vergrössern Sie den Suchradius (klicken Sie dazu auf "Suchoptionen")
NEU: Gibt es hier ein Restaurant welches wir noch nicht gelistet haben? Legen Sie es am besten gleich selbst an! In nur einem Schritt.
'; if ((tmp_address.toLowerCase() != city.toLowerCase()) && (city.length > 0)) { // // // neuer versuch: nur der stadtname // alert('Adresse "' + address + '" nicht gefunden, die Karte wird auf "' + city + '" gesetzt'); document.getElementById('radius').selectedIndex = 5; showAddress(city); } else { // // // stadtname wurde bereits probiert, oder es wurde kein stadtname eingegeben // hideElement('indicator'); if (is_jena == '1') { // // // auf Jena setzen // position.setPoint(new GLatLng(50.926383, 11.585212)); map.setCenter(position.getPoint(), getMyZoom(15)); } else { // // // auf Deutschland setzen // position.setPoint(new GLatLng(50.86144411058923, 10.634765625)); map.setCenter(position.getPoint(), 5); } alert("Adresse \"" + address + "\" nicht gefunden"); } } else { // // // adresse gefunden // map.setCenter(point, getMyZoom(15)); position.setPoint(point); page = 1; showPositionInfo(); } } ); } } parseRestaurantsXMLFile2 = function(data, responseCode) { for (var i=0; i 2000) { locations[i]['distance_fmt'] = (Math.round(locations[i]['distance'] / 100) / 10) + ' km'; } else { locations[i]['distance_fmt'] = Math.round(locations[i]['distance']) + ' m'; } locations[i]['has_mittagskarte'] = (parseInt(arr[i].getAttribute('hasMittagskarte')) == 1 ? true : false); locations[i]['mittagskarte_id'] = parseInt(arr[i].getAttribute('mittagskarte_id')); locations[i]['has_speisekarte'] = (parseInt(arr[i].getAttribute('hasSpeisekarte')) == 1 ? true : false); locations[i]['isValid'] = parseInt(arr[i].getAttribute("isValid")); locations[i]['isFavorite'] = arr[i].getAttribute("isFavorite"); locations[i]['image'] = GXml.value(arr[i].getElementsByTagName("restaurant_image")[0]); var ic = tiny; if (locations[i]['isFavorite'] == 'y') { ic = fav_icon; } else { if (locations[i]['isValid'] == '1') { ic = tiny; } else { ic = whiteIcon; } } locations[i]['marker'] = new GMarker(new GLatLng(locations[i]['lat'], locations[i]['lng']), {icon:ic, title:locations[i]['name_plain'], clickable:true}); var menues_root = arr[i].getElementsByTagName('menues')[0]; locations[i]['has_more_menues'] = parseInt(menues_root.getAttribute('has_more')); locations[i]['regular_menues_count'] = parseInt(menues_root.getAttribute('regular_menues_count')); locations[i]['card_menues_count'] = parseInt(menues_root.getAttribute('card_menues_count')); locations[i]['menues'] = new Array(); var menues = menues_root.getElementsByTagName('menue'); for (var j=0; j 0) { locations[i]['menues'][j]['menue_price'] += ' €'; } locations[i]['menues'][j]['text'] = GXml.value(menues[j].getElementsByTagName("text_short")[0]); locations[i]['menues'][j]['text_long'] = GXml.value(menues[j].getElementsByTagName("text_long_html")[0]); locations[i]['menues'][j]['card_id'] = parseInt(menues[j].getAttribute("card_id")); } map.addOverlay(locations[i]['marker']); // ==== Each time a point is found, extent the bounds to include it ===== bounds.extend(locations[i]['marker'].getPoint()); var restaurantHtml = ''; if (is_large_map == 'y') { restaurantHtml = '
'; restaurantHtml += '' + '' + '' + '' + '' + '
'+locations[i]['name']+'
'+locations[i]['address']+'
Telefon: '+locations[i]['phone']+'
'+locations[i]['website']+'
' + '
'; } else { link = 'Alle Angebote, '; if (locations[i]['website'].length > 0) { link += 'Homepage, '; } link += 'Direktlink'; restaurantHtml = '
' + '
' + locations[i]['street']+'
' + locations[i]['zip']+' '+locations[i]['city']+'
' + 'Telefon: '+locations[i]['phone']+'
' + link + '
'; if (locations[i]['image'].length > 0) { restaurantHtml += 'Restaurant-Bild'; } else { restaurantHtml += '
Noch kein Bild vorhanden

Haben Sie ein Bild von diesem Restaurant?
Dann fügen Sie es hier hinzu.
'; } restaurantHtml += '
'; } locations[i]['restaurant_html'] = restaurantHtml; locations[i]['active_menue'] = -1; //locations[i]['eventListener'] = addInfoWindowTabs3(i); //locations[i]['eventListener'] = addInfoWindow(i, restaurantHtml); //locations[i]['eventListener'] = addInfoWindow4(i, locations[i]['name'], restaurantHtml); if (is_large_map == 'y') { locations[i]['eventListener'] = addInfoWindow(i, restaurantHtml); } else { //locations[i]['eventListener'] = addInfoWindow5(i, restaurantHtml); locations[i]['eventListener'] = addInfoWindow6(i, locations[i]['name'], restaurantHtml); } } showPositionInfo3(); } function showPositionInfo() { hideElement('prevPage'); hideElement('nextPage'); showElement('indicator'); /** * lade dynamisch restaurants, wenn fertig: showPositionInfo3() */ var obj; obj = document.getElementById("datetime"); var datetime = 0; if (obj) { datetime = obj.value; } obj = document.getElementById("filter_res"); var filter_res = 'n'; if (obj) { filter_res = (obj.checked ? 'y' : 'n'); } GDownloadUrl('/restaurant/locationFileByTagNames?tags='+urlencode_string_plus(tag_names)+'&page='+page+'&datetime='+datetime+'&filterres='+filter_res, parseRestaurantsXMLFile2); } function showPositionInfo3() { if (is_large_map == 'y') { var noRestaurantsControl = document.getElementById("noRestaurantsControl"); noRestaurantsControl.style.display = 'none'; } if (locations.length > 0) { if (locations.length == 1) { map.setCenter(new GLatLng(locations[0]['lat'], locations[0]['lng']), getMyZoom(14)); } else { bounds.extend(new GLatLng(bounds.getNorthEast().lat()+0.0005, bounds.getNorthEast().lng()+0.0075)); bounds.extend(new GLatLng(bounds.getSouthWest().lat()-0.00025, bounds.getSouthWest().lng()-0.0075)); // ===== determine the centre from the bounds ====== map.setCenter(bounds.getCenter()); // ===== determine the zoom level from the bounds ===== map.setZoom(map.getBoundsZoomLevel(bounds)); } if (is_large_map == 'n') { var htmlText = ""; for (var i=0; i' + '
' + '
' + ' Restaurant-Informationen' + ' auf Karte anzeigen' + getLinkToFavorite(i) + getLinkToMeeting(i) + '
' + ' ' + locations[i]['name'] + '' + '
' + '
' + '
' + ' ' + ' ' + ' ' + ' ' + ' '; if (locations[i]['menues'].length == 0) { //htmlText += ''; if (locations[i]['info_long'].length > 0) { htmlText += ''; } else { htmlText += ''; } } else { for (var j=0; j -1 ? '&card='+locations[i]['menues'][j]['card_id'] : ''); htmlText += ''; } } var extra_links = ''; //if (locations[i]['has_more_menues'] == 1) if (locations[i]['regular_menues_count'] > locations[i]['menues'].length) { extra_links += 'Aktuelle Angebote'; } if (locations[i]['has_mittagskarte']) { if (extra_links.length > 0) { extra_links += ', '; } extra_links += 'Mittagskarte'; } else if (locations[i]['has_speisekarte']) { if (extra_links.length > 0) { extra_links += ', '; } extra_links += 'Speisekarte'; } if (extra_links.length > 0) { htmlText += ''; } htmlText += '
für '+options['date_fmt']+' noch nicht aktualisiert
Tagesgerichte für diese Woche anzeigen
' + locations[i]['info_long'] + '
für '+options['date_fmt']+' noch nicht aktualisiert
' + ""+locations[i]['menues'][j]['text']+"" + '' + locations[i]['menues'][j]['menue_price'] + '
alle Angebote anzeigen: ' + extra_links + '
' + '
' + '
'; } // for htmlText += '
NEU: Vermissen Sie ein Restaurant? Legen Sie es am besten gleich selbst an! In nur einem Schritt.
'; document.getElementById("resultlist").innerHTML = htmlText; } } else { if (is_large_map == 'n') { document.getElementById("resultlist").innerHTML = ''; //document.getElementById("result_pager").innerHTML = ' keine Restaurants gefunden

Tipp: Vergrössern Sie den Suchradius (klicken Sie dazu auf "Suchoptionen")

Gibt es hier ein Restaurant welches wir noch nicht gelistet haben? Teilen Sie es uns mit!
'; document.getElementById("result_pager").innerHTML = ' keine Restaurants gefunden

Tipp: Vergrössern Sie den Suchradius (klicken Sie dazu auf "Suchoptionen")
NEU: Gibt es hier ein Restaurant welches wir noch nicht gelistet haben? Legen Sie es am besten gleich selbst an! In nur einem Schritt.
'; } else { var noRestaurantsControl = document.getElementById("noRestaurantsControl"); noRestaurantsControl.style.display = 'block'; document.getElementById("result_pager").innerHTML = ' keine Restaurants gefunden'; } } hideElement('indicator'); if (options['count'] > 0) { document.getElementById("result_pager").innerHTML = getPagerNavigation2(true); } } function heat(res){ cool(); attract = new GMarker(locations[res]['marker'].getPoint(), {icon:hotIcon, title:'Markiertes Restaurant'}); map.addOverlay(attract); } function cool(){ if (attract != null) { map.removeOverlay(attract); attract = null; } } function go(num){ if (hideOvermap) { hideOvermap(); } GEvent.trigger(locations[num]['marker'], 'click'); } function go2(res, menue){ if (hideOvermap) { hideOvermap(); } locations[res]['active_menue'] = menue; GEvent.trigger(locations[res]['marker'], "click"); locations[res]['active_menue'] = -1; } function load2() { load(); showPositionInfo(); } function hasMoreResults() { return (options['hasMorePages'] == 1); } function nextPage() { if (hasMoreResults()) { page++; updateAll(false); } } function prevPage() { if (page > 1) { page--; updateAll(false); } } function toPage(pageNumber) { page = pageNumber; updateAll(false); } function updateAll(resetPage) { if (typeof(resetPage) != 'boolean') { resetPage = true; } if (hideOvermap) { hideOvermap(); } //map.closeInfoWindow(); hideInfo(); if (resetPage) { page = 1; } map.setZoom(getMyZoom(15)); showPositionInfo(); } /** * Quelle: http://maps.forum.nu/gm_clickable_circle.html */ function drawCircle(centerLatLng, radiusInMeter, option) { if (typeof(option) == 'undefined') { option = 'global'; } var zoom = map.getZoom(); var normalProj = G_NORMAL_MAP.getProjection(); var centerPt = normalProj.fromLatLngToPixel(centerLatLng, zoom); //var dLat = 0.01792; // geogr. breite, 1" = 31m (europa) //var dLng = 0.02778; // geogr. länge, 1" = 20m (europa) var earthRadiusInMeter = 6378137; var dLat = radiusInMeter*180/Math.PI/earthRadiusInMeter; var radiusPt = normalProj.fromLatLngToPixel(new GLatLng(centerLatLng.lat()+dLat, centerLatLng.lng()), zoom); var circlePoints = []; with (Math) { var radius = floor(sqrt(pow((centerPt.x-radiusPt.x),2) + pow((centerPt.y-radiusPt.y),2))); for (var a = 0 ; a < 361 ; a+=10 ) { var aRad = a*(PI/180); var y = centerPt.y + radius * sin(aRad) var x = centerPt.x + radius * cos(aRad) var p = new GPoint(x, y); circlePoints.push(normalProj.fromPixelToLatLng(p, zoom)); } var color = '#F47721'; var fillcolor = '#F47721'; if (option == 'local') { if (circleline2 != null) { map.removeOverlay(circleline2); circleline2 = null; } circleline2 = new GPolygon(circlePoints, '#FF0000', 2, 1, fillcolor, 0.5); map.addOverlay(circleline2); } else { if (circleline != null) { map.removeOverlay(circleline); circleline = null; } circleline = new GPolygon(circlePoints, color, 5, 0.75, fillcolor, 0.25); map.addOverlay(circleline); } } } function selectResult(res) { //heat(res); drawCircle(locations[res]['marker'].getPoint(), 30, 'local'); } function unselectResult(res) { //cool(); if (circleline2 != null) { map.removeOverlay(circleline2); circleline2 = null; } } function getMyZoom(defZoom) { var obj = document.getElementById("radius"); if (obj) { var r = obj.value; switch (r) { case "250": return 16; case "500": return 15; case "1000": return 14; case "2000": return 13; case "5000": return 11; case "10000": return 10; case "25000": return 9; default: return defZoom; } } else { return defZoom; } } function getPagerNavigation() { var text2 = options['from'] + ' bis ' + options['to']; var text = 'Suchergebnis für ' + options['date_fmt'] + ', ' + options['date_fmt2'] + ':
' + options['count']+' Restaurants gefunden
'; if (page > 1) { text += '     ' + text2; } else { text += '     ' + text2; } if (hasMoreResults()) { text += '     '; } else { text += '     '; } return text; } function pager_navigation2_as_array(current_page, count_results, max_per_page, nb_links) { if (typeof(nb_links) != 'number') { nb_links = 10; } var arr = new Array(); var max_page = Math.ceil(count_results / max_per_page); var tmp = current_page - Math.floor(nb_links / 2); var check = max_page - nb_links + 1; var limit = (check > 0) ? check : 1; var begin = (tmp > 0) ? ((tmp > limit) ? limit : tmp) : 1; var i = begin; while ((i < begin + nb_links) && (i <= max_page)) { arr.push(i); i++; } return arr; } function getPagerNavigation2(show_first_last) { if (typeof(show_first_last) != 'boolean') { show_first_last = true; } var arr = pager_navigation2_as_array(page, options['count'], options['max_per_page'], 5); var text = ''; if (is_large_map != 'y') { text = '
' + options['count']+' Restaurants gefunden
'; text += '
'; if (page > 1) { text += '«'; } else { text += '«'; } // // // show link to first page, if necessary // if (show_first_last && (arr[0] > 1)) { text += '1...'; } // // // show links // for (var i=0; i'; } else { text += '' + arr[i] + ''; } } // // // show link to last page, if necessary // if (show_first_last) { var max_pages = Math.ceil(options['count'] / options['max_per_page']); if (arr[arr.length-1] < max_pages) { text += '...' + max_pages + ''; } } if (hasMoreResults()) { text += '»'; } else { text += '»'; } text += '
'; } else { text = options['count']+' Restaurants gefunden'; } return text; } function updateMarker(restaurant_id, new_icon) { var idx = restaurant_id_to_location_index[restaurant_id]; //tabs = map.getInfoWindow().getTabs(); //var old_restaurant_html = tabs[0]['contentElem'].innerHTML; var old_restaurant_html = locations[idx]['restaurant_html']; GEvent.removeListener(locations[idx]['eventListener']); map.removeOverlay(locations[idx]['marker']); locations[idx]['marker'] = new GMarker(new GLatLng(locations[idx]['lat'], locations[idx]['lng']), {'icon':new_icon, 'title':locations[idx]['name_plain'], 'clickable':true}); map.addOverlay(locations[idx]['marker']); //locations[idx]['eventListener'] = addInfoWindowTabs3(idx); //locations[idx]['eventListener'] = addInfoWindow(idx, old_restaurant_html); //locations[idx]['eventListener'] = addInfoWindow4(idx, locations[idx]['name'], old_restaurant_html); if (is_large_map == 'y') { locations[idx]['eventListener'] = addInfoWindow(idx, old_restaurant_html); } else { //locations[idx]['eventListener'] = addInfoWindow5(idx, old_restaurant_html); locations[idx]['eventListener'] = addInfoWindow6(idx, locations[idx]['name'], old_restaurant_html); } } function getLinkToFavorite(i) { var res = ""; res = ''; if (locations[i]['isFavorite'] == 'y') { res += ' von Lieblings-Restaurants entfernen'; } else if (locations[i]['isFavorite'] == 'n') { res += ' zu Lieblings-Restaurants hinzufügen'; } else { res += ' zu Lieblings-Restaurants hinzufügen (nicht eingeloggt)'; } res += ''; return res; } function getLinkToMeeting(i) { var res = ""; if ((locations[i]['isFavorite'] == 'y') || (locations[i]['isFavorite'] == 'n')) { res = ' Als Mittagstreffpunkt verabreden'; } else { res = ' Als Mittagstreffpunkt verabreden (nicht eingeloggt)'; } return res; } function updateMapType(t) { var maptype; switch (t) { case "1": maptype = G_SATELLITE_MAP; break; case "2": maptype = G_HYBRID_MAP; break; case "0": default: maptype = G_NORMAL_MAP; } map.setMapType(maptype); } function hideInfo() { if (is_large_map == 'y') { map.closeInfoWindow(); } else { var obj = document.getElementById('mapInfo'); if (obj) { obj.style.display = 'none'; } } } function go3(num){ if (hideOvermap) { hideOvermap(); } hideInfo(); var point = locations[num]['marker'].getPoint(); map.setCenter(point, 16); }