Changeset 4

Show
Ignore:
Timestamp:
10/07/08 13:05:11 (3 years ago)
Author:
blundeln
Message:

working on manual geocode override for when google gets it wrong.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • drupal/modules/simple_maps/trunk/TODO

    r3 r4  
    1 - bit more testing 
     1- gmap api is hit and miss, so I need a manual override for the user 
     2- view node should display static map 
     3- edit node should display dynamic map 
     4  - when moved, will override geocoded location of node. 
  • drupal/modules/simple_maps/trunk/simple_maps.module

    r3 r4  
    117117  $testAddress = " Ground Floor, Waterlinks House, Richard Street, Birmingham B7 4AA "; 
    118118  $testAddress = "10 Downing Street, London"; 
    119   $testAddress = "ruskin ave\n colne"; 
    120   $postcode = "BB8 9rp"; 
    121   //$postcode = "SW1 2AA"; 
     119  $testAddress = " No. 1 Snow Hill Plaza, St. Chad’s, Queensway, Birmingham"; 
     120  $postcode = "B4 6JG"; 
    122121  //$postcode = "cv1 1ea"; 
    123122  //$postcode = Null; 
     
    153152/* Looks at permutations of the address and postcode to try to improve accuracy of google api. */ 
    154153function _smart_geocode($address, $areaCode=Null) { 
    155    
     154 
     155  //XXX 
     156  $areaCode = Null; 
     157 
    156158  // Get area code (eg. postcode). 
    157   $areaLoc = gmap_geocode($areaCode); 
    158   $areaLoc = _validateUKLocation($areaLoc); 
     159  if ($areaCode) { 
     160    $areaLoc = gmap_geocode($areaCode); 
     161    $areaLoc = _validateUKLocation($areaLoc); 
     162  } else { 
     163    $areaLoc = Null; 
     164  } 
    159165  $addressLoc = Null; 
    160166   
     
    334340} 
    335341 
    336 /* Renders a gmap to diaply the specified markers. */ 
     342/* Renders a gmap to display the specified markers. */ 
    337343function _render_map($markers=Null) { 
    338344  $output = "";