Skip to content
Browse files

fixed location map generation

  • Loading branch information...
1 parent 58b4595 commit 34ec15b5ef49036fbacbda0ee7209c4e37ab16cd @everzet committed Aug 29, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 views/backbone/_events.ejs
View
4 views/backbone/_events.ejs
@@ -66,7 +66,7 @@
{% } %}
</span>
{% if (typeof location != 'undefined') { %}
- <div class="img" style="width:150px; height:150px; background:url(http://maps.google.com/maps/api/staticmap?center={{ location }}&zoom=13&size=150x150&sensor=false);"></div>
+ <div class="img" style="width:150px; height:150px; background:url(http://maps.google.com/maps/api/staticmap?center={{ encodeURIComponent(location) }}&zoom=13&size=150x150&sensor=false);"></div>
{% } else { %}
<div class="img" style="width:150px; height:150px; background:url(http://maps.google.com/maps/api/staticmap?center=Unknown&zoom=13&size=150x150&sensor=false);"></div>
{% } %}
@@ -124,7 +124,7 @@
<article>
<header class="map">
{% if (typeof location != 'undefined') { %}
- <div class="img" style="width:300px; height:300px; background:url(http://maps.google.com/maps/api/staticmap?center={{ location }}&markers=size:mid|color:blue|{{ location }}&zoom=13&size=300x300&sensor=false);"></div>
+ <div class="img" style="width:300px; height:300px; background:url(http://maps.google.com/maps/api/staticmap?center={{ encodeURIComponent(location) }}&markers=size:mid|color:blue|{{ encodeURIComponent(location) }}&zoom=13&size=300x300&sensor=false);"></div>
{% } else { %}
<div class="img" style="width:300px; height:300px; background:url(http://maps.google.com/maps/api/staticmap?center=Unknown&markers=size:mid|color:blue|Unknown&zoom=13&size=300x300&sensor=false);"></div>
{% } %}

0 comments on commit 34ec15b

Please sign in to comment.
Something went wrong with that request. Please try again.