Permalink
Browse files

BUGFIX: Fixed URL casting not returning a value in the google maps te…

…mplate.
  • Loading branch information...
1 parent 0170b77 commit e52ec3f8df428c54d87469c5950aedcd4ff97c36 @ajshort ajshort committed Feb 8, 2011
Showing with 5 additions and 4 deletions.
  1. +3 −2 code/Addressable.php
  2. +2 −2 templates/AddressMap.ss
View
@@ -152,8 +152,9 @@ public function getFullAddressHTML() {
*/
public function AddressMap($width, $height) {
$data = $this->owner->customise(array(
- 'Width' => $width,
- 'Height' => $height
+ 'Width' => $width,
+ 'Height' => $height,
+ 'Address' => rawurlencode($this->getFullAddress())
));
return $data->renderWith('AddressMap');
}
View
@@ -1,5 +1,5 @@
<div class="addressMap">
- <a href="http://maps.google.com/?q=$FullAddress.URLATT">
- <img src="http://maps.google.com/maps/api/staticmap?size={$Width}x{$Height}&markers=$FullAddress.URLATT&sensor=false" alt="$FullAddress.ATT" />
+ <a href="http://maps.google.com/?q=$Address">
+ <img src="http://maps.google.com/maps/api/staticmap?size={$Width}x{$Height}&markers=$Address&sensor=false" alt="$FullAddress.ATT" />
</a>
</div>

0 comments on commit e52ec3f

Please sign in to comment.