Changeset 7802 for trunk/src/map/inc


Ignore:
Timestamp:
Apr 17, 2010, 1:59:17 PM (15 years ago)
Author:
janveeden
Message:

Added option to turn the google location search off/on at bottom of map.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/map/inc/nodemapWL.js

    r7801 r7802  
    11//Declaring some variables we will be using
     2var gmap_search_state = false;
    23var map;
    34var markerArray = new Array();
     
    1718        //Adding the google map into the div called #mapcanvas
    1819        map = new GMap2(document.getElementById("mapcanvas"), {googleBarOptions : {style : "new",}});
    19         map.enableGoogleBar();
    2020        //Center the map on Leiden
    2121        map.setCenter(new GLatLng(52.162687, 4.493294), 11); // Vars should go to config
    2222        map.setUIToDefault();
     23
    2324 
    2425
     
    307308}
    308309
    309 function search()
    310 {
    311 
    312 }
    313 
    314 
    315 
    316 
    317 
     310function toggleGoogleSearchMap()
     311{
     312        if(gmap_search_state)
     313        {
     314                gmap_search_state = false;
     315        }
     316        else
     317        {
     318                gmap_search_state = true;
     319        }
     320       
     321        if(gmap_search_state)
     322        {
     323                map.enableGoogleBar();
     324        }
     325       
     326        if(!gmap_search_state)
     327        {
     328                map.disableGoogleBar();
     329        }
     330}
     331
     332
     333
     334
     335
Note: See TracChangeset for help on using the changeset viewer.