Browse Source

More bug fixes for Google Maps API

pull/23/merge
Zach Wise 13 years ago
parent
commit
c7c8dceb9d
  1. 6
      locale/de.js
  2. 6
      locale/en.js
  3. 6
      locale/es.js
  4. 6
      locale/fr.js
  5. 6
      locale/it.js
  6. 6
      locale/kr.js
  7. 6
      locale/nl.js
  8. 6
      locale/pt-br.js
  9. 6
      locale/zh-ch.js
  10. 6
      locale/zh-tw.js
  11. 10
      source/js/VMM.ExternalAPI.js
  12. 6
      timeline-min.js
  13. 10
      timeline.js

6
locale/de.js

File diff suppressed because one or more lines are too long

6
locale/en.js

File diff suppressed because one or more lines are too long

6
locale/es.js

File diff suppressed because one or more lines are too long

6
locale/fr.js

File diff suppressed because one or more lines are too long

6
locale/it.js

File diff suppressed because one or more lines are too long

6
locale/kr.js

File diff suppressed because one or more lines are too long

6
locale/nl.js

File diff suppressed because one or more lines are too long

6
locale/pt-br.js

File diff suppressed because one or more lines are too long

6
locale/zh-ch.js

File diff suppressed because one or more lines are too long

6
locale/zh-tw.js

File diff suppressed because one or more lines are too long

10
source/js/VMM.ExternalAPI.js

@ -348,11 +348,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1])); location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1]));
} else if (type.of(VMM.Util.getUrlVars(m.url)["sll"]) == "string") { } else if (type.of(VMM.Util.getUrlVars(m.url)["sll"]) == "string") {
/*
has_location = true;
latlong = VMM.Util.getUrlVars(m.url)["sll"].split(","); latlong = VMM.Util.getUrlVars(m.url)["sll"].split(",");
location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1])); location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1]));
*/
} }
if (type.of(VMM.Util.getUrlVars(m.url)["z"]) == "string") { if (type.of(VMM.Util.getUrlVars(m.url)["z"]) == "string") {
@ -395,25 +392,26 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
var kml_url = m.url + "&output=kml"; var kml_url = m.url + "&output=kml";
kml_url = kml_url.replace("&output=embed", ""); kml_url = kml_url.replace("&output=embed", "");
var kml_layer = new google.maps.KmlLayer(kml_url, {preserveViewport:has_location}); var kml_layer = new google.maps.KmlLayer(kml_url, {preserveViewport:true});
kml_layer.setMap(map); kml_layer.setMap(map);
var infowindow = new google.maps.InfoWindow(); var infowindow = new google.maps.InfoWindow();
google.maps.event.addListenerOnce(kml_layer, "defaultviewport_changed", function() { google.maps.event.addListenerOnce(kml_layer, "defaultviewport_changed", function() {
map.fitBounds(kml_layer.getDefaultViewport() );
if (has_location) { if (has_location) {
map.panTo(location); map.panTo(location);
} }
if (has_zoom) { if (has_zoom) {
map.setZoom(zoom); map.setZoom(zoom);
} else {
map.fitBounds(kml_layer.getDefaultViewport() );
} }
}); });
google.maps.event.addListener(kml_layer, 'click', function(kmlEvent) { google.maps.event.addListener(kml_layer, 'click', function(kmlEvent) {
var text = kmlEvent.featureData.description; var text = kmlEvent.featureData.description;
trace(kmlEvent.featureData.infoWindowHtml) trace(kmlEvent.featureData.infoWindowHtml)

6
timeline-min.js vendored

File diff suppressed because one or more lines are too long

10
timeline.js

@ -2575,11 +2575,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1])); location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1]));
} else if (type.of(VMM.Util.getUrlVars(m.url)["sll"]) == "string") { } else if (type.of(VMM.Util.getUrlVars(m.url)["sll"]) == "string") {
/*
has_location = true;
latlong = VMM.Util.getUrlVars(m.url)["sll"].split(","); latlong = VMM.Util.getUrlVars(m.url)["sll"].split(",");
location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1])); location = new google.maps.LatLng(parseFloat(latlong[0]),parseFloat(latlong[1]));
*/
} }
if (type.of(VMM.Util.getUrlVars(m.url)["z"]) == "string") { if (type.of(VMM.Util.getUrlVars(m.url)["z"]) == "string") {
@ -2622,25 +2619,26 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
var kml_url = m.url + "&output=kml"; var kml_url = m.url + "&output=kml";
kml_url = kml_url.replace("&output=embed", ""); kml_url = kml_url.replace("&output=embed", "");
var kml_layer = new google.maps.KmlLayer(kml_url, {preserveViewport:has_location}); var kml_layer = new google.maps.KmlLayer(kml_url, {preserveViewport:true});
kml_layer.setMap(map); kml_layer.setMap(map);
var infowindow = new google.maps.InfoWindow(); var infowindow = new google.maps.InfoWindow();
google.maps.event.addListenerOnce(kml_layer, "defaultviewport_changed", function() { google.maps.event.addListenerOnce(kml_layer, "defaultviewport_changed", function() {
map.fitBounds(kml_layer.getDefaultViewport() );
if (has_location) { if (has_location) {
map.panTo(location); map.panTo(location);
} }
if (has_zoom) { if (has_zoom) {
map.setZoom(zoom); map.setZoom(zoom);
} else {
map.fitBounds(kml_layer.getDefaultViewport() );
} }
}); });
google.maps.event.addListener(kml_layer, 'click', function(kmlEvent) { google.maps.event.addListener(kml_layer, 'click', function(kmlEvent) {
var text = kmlEvent.featureData.description; var text = kmlEvent.featureData.description;
trace(kmlEvent.featureData.infoWindowHtml) trace(kmlEvent.featureData.infoWindowHtml)

Loading…
Cancel
Save