Changeset 7820 for trunk/src


Ignore:
Timestamp:
Apr 18, 2010, 10:02:22 AM (15 years ago)
Author:
janveeden
Message:

Clicking on a node in the searchlist will now zoom to the node that was clicked on.

Location:
trunk/src/map/inc
Files:
2 edited

Legend:

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

    r7816 r7820  
    349349}
    350350
     351function goToMarker(value)
     352{
     353        for(var i=0; i<markerArray.length; i++)
     354        {
     355                var name = markerArray[i].getTitle();
     356               
     357                if(name == value)
     358                {
     359                        map.setCenter(markerArray[i].getLatLng(), 15);
     360                }
     361        }
     362}
     363
    351364function toggleGoogleSearchMap()
    352365{
  • trunk/src/map/inc/suggestions.php

    r7805 r7820  
    4545}
    4646
    47 echo "<select multiple>";
     47echo "<select multiple onchange='goToMarker(this.options[this.selectedIndex].text)'>";
    4848foreach($suggested_markers as $name)
    4949{
    5050        $name = (string)$name;
    51         echo "<option value='{$name}'>{$name}</option>";
     51        echo "<option value='{$name}' >{$name}</option>";
    5252}
    5353echo "</select>";
Note: See TracChangeset for help on using the changeset viewer.