Permalink
Browse files

GeoEncoder plugin bugfix

Don't display "invalid Google Maps key" when post is not geoencoded
Closes #570
  • Loading branch information...
1 parent 9f6f8da commit 1538659264fbca3fc0c45c46acb0845be3f27cb1 @ginatrapani ginatrapani committed Jan 27, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 webapp/plugins/geoencoder/view/geoencoder.map.iframe.tpl
@@ -23,15 +23,17 @@
var geo = "{$post->geo}";
var latlng = geo.split(',');
</script>
+{if $gmaps_api}
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key={$gmaps_api}" type="text/javascript">
</script>
<script type="text/javascript" src="{$site_root_path}plugins/geoencoder/assets/js/markerclusterer_packed.js"></script>
+{/if}
<link rel="stylesheet" type="text/css" href="{$site_root_path}plugins/geoencoder/assets/css/maps.css" />
</head>
-<body onload="initializeMap()" onunload="GUnload()">
- {if $errormsg}
+<body {if $errormsg}>
{include file="_usermessage.tpl"}
{else}
+ onload="initializeMap()" onunload="GUnload()">
<div id="wrap">
<div id="mappanel">
<div id="map"></div>

0 comments on commit 1538659

Please sign in to comment.