From d2ec17ff5331bed9e48458cce19d5fcd74c54be6 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Fri, 15 Feb 2013 19:18:11 +0100 Subject: [PATCH] added static map --- WebKit/scripts/helper/Core.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index 6a318f1..37439c9 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -320,9 +320,21 @@ function(jQuery, Paths, URI, HostApp, Cache) { // {"type":"Point","coordinates":[57.10803113,12.25854746]} if (status.content && status.content.location && (typeof status.content.location.type == "undefined" || status.content.location.type == "Point")) { - var href = "http://www.openstreetmap.org/?mlat=" + status.content.location.coordinates[0] + "&mlon=" + status.content.location.coordinates[1] + "&zoom=12" + var lat = status.content.location.coordinates[0]; + var lng = status.content.location.coordinates[1]; + + var href = "http://www.openstreetmap.org/?mlat=" + lat + "&mlon=" + lng + "&zoom=12" template.geo.href = href; template.geo.style.display = ""; + + var a = document.createElement("a"); + a.className = "map"; + a.href = href; + var img = document.createElement("img"); + img.src = "http://staticmap.openstreetmap.de/staticmap.php?center=" + lat + "," + lng + "&zoom=3&size=75x75&markers=" + lat + "," + lng + ",red-pushpin" + a.appendChild(img); + + template.images.appendChild(a); } if (typeof status.__repost != "undefined") {