Browse Source

restore API key; not technically required but we want people to use it

pull/536/head
Joe Germuska 11 years ago
parent
commit
6e2e641d87
  1. 11
      source/js/Core/Embed/Embed.CDN.Generator.js
  2. 4
      website/templates/_make.html

11
source/js/Core/Embed/Embed.CDN.Generator.js

@ -67,6 +67,7 @@ function getLinkAndIframe() {
e_startzoomadjust = document.getElementById('embed-startzoomadjust'),
e_startatslide = document.getElementById('embed-startatslide'),
e_debug = document.getElementById('embed-debug'),
e_googlemapkey = document.getElementById('embed-googlemapkey'),
start_at_end = false,
hash_bookmark = false,
is_debug = false,
@ -130,6 +131,10 @@ function getLinkAndIframe() {
wp += "debug='" + is_debug + "' ";
}
if (e_googlemapkey.value != "") {
wp += "gmap_key='" + e_googlemapkey.value + "' ";
}
if (parseInt(e_startatslide.value, 10) > 0) {
wp += "start_at_slide='" + parseInt(e_startatslide.value, 10) + "' ";
}
@ -164,7 +169,11 @@ function getLinkAndIframe() {
if (parseInt(e_startzoomadjust.value, 10) > 0) {
vars += "&start_zoom_adjust=" + parseInt(e_startzoomadjust.value, 10);
}
if (e_googlemapkey.value != "") {
vars += "&gmap_key=" + e_googlemapkey.value;
}
if (e_width.value > 0) {
vars += "&width=" + e_width.value;
}

4
website/templates/_make.html

@ -139,6 +139,10 @@
<option value="HYBRID">Google Maps: Hybrid</option>
<option value="SATELLITE">Google Maps: Satellite</option>
</select>
<input type="text" placeholder="Google Maps API Key" id="embed-googlemapkey">
<p class="help-block">If you are using a Google map type, please enter your <a href="https://developers.google.com/places/documentation/#Authentication" target="_blank">API Key</a>.<br>
Stamen map types are temporarily disabled while we work out a bug.
</p>
</div>
</div>
<!-- Fonts-->

Loading…
Cancel
Save