Skip to content

Instantly share code, notes, and snippets.

@matkoenig
Last active June 12, 2025 06:36
Show Gist options
  • Select an option

  • Save matkoenig/81e7a4c4c4144668e64d34fd4b699da5 to your computer and use it in GitHub Desktop.

Select an option

Save matkoenig/81e7a4c4c4144668e64d34fd4b699da5 to your computer and use it in GitHub Desktop.
Picasa 3 - Google maps module no longer works [solved] - replaced by Leaflet
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Map for Picasa Locations</title>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
#map {
width: 100%;
height: 100%;
margin: 0;
border: 1px solid #979797;
}
.leaflet-container .leaflet-control-attribution {
display: none;
}
</style>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<script type="text/javascript" charset="utf-8">
function picasa_initialize(a, b, d, c, e) {
picasa.init();
return true;
}
function SubmitQueue(a) {
picasa.SubmitQueue(a);
}
var picasa = {
queue: "",
map: null,
mtyp: 1,
zoom: 13,
maps: {
osm: L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {maxZoom: 19}),
ewi: L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", {maxZoom: 19}),
ghy: L.tileLayer("https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}", {maxZoom: 19, subdomains:["mt0", "mt1", "mt2", "mt3"]})
},
markers: [],
init: function() {
},
SubmitQueue: function(a) {
if (picasa.queue !== "") { picasa.queue = a; return; }
picasa.queue = a;
setTimeout(function() { eval(picasa.queue); picasa.queue = ""; }, 0);
},
beginAddingMarkers: function() {
picasa.markers = [];
},
addMarker: function(lat, lon, id, d) {
picasa.markers.push({lat: lat, lon: lon});
},
endAddingMarkers: function(a) {
var bounds = [];
if (picasa.markers.length === 0) {
document.getElementById("map").innerHTML = "";
return;
}
if (picasa.map) picasa.map.remove();
picasa.map = L.map("map", {
center: [picasa.markers[0].lat, picasa.markers[0].lon],
zoom: picasa.zoom
});
picasa.map.on("baselayerchange", function (e) {
picasa.mtyp = e.layer.options.zIndex;
});
picasa.map.on("zoomend", function(e) {
picasa.zoom = picasa.map.getZoom();
});
L.control.layers({
"OSM": picasa.maps.osm,
"Satellite": picasa.maps.ewi,
"Hybrid": picasa.maps.ghy
}, null, {
position: "bottomleft",
collapsed: false
}).addTo(picasa.map);
switch (picasa.mtyp) {
case 1: picasa.maps.osm.addTo(picasa.map); break;
case 2: picasa.maps.ewi.addTo(picasa.map); break;
case 3: picasa.maps.ghy.addTo(picasa.map); break;
}
for (i = 0; i < picasa.markers.length; i++) {
L.marker([picasa.markers[i].lat, picasa.markers[i].lon]).addTo(picasa.map);
bounds.push([picasa.markers[i].lat, picasa.markers[i].lon]);
}
if (picasa.markers.length > 1) picasa.map.fitBounds(bounds, {padding: [20, 20]});
},
setNumSelected: function(a) {
}
};
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
@matkoenig
Copy link
Author

(1) Open the folder C:\Program Files (x86)\Google\Picasa3\runtime\geotag
(2) Replace file geopanelscript_v3.html with code of Gist
(3) Enjoy ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment