From b0c589de9aa7bfd41bd59e12ff16d0791009fb18 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Jun 2010 18:29:01 +0000 Subject: Ticket #2330: fix Google Maps provider for Mapstraction plugin --- plugins/Mapstraction/MapstractionPlugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Mapstraction') diff --git a/plugins/Mapstraction/MapstractionPlugin.php b/plugins/Mapstraction/MapstractionPlugin.php index 868933fd4..e7240a644 100644 --- a/plugins/Mapstraction/MapstractionPlugin.php +++ b/plugins/Mapstraction/MapstractionPlugin.php @@ -125,8 +125,8 @@ class MapstractionPlugin extends Plugin $action->script('http://tile.cloudmade.com/wml/0.2/web-maps-lite.js'); break; case 'google': - $action->script(sprintf('http://maps.google.com/maps?file=api&v=2&sensor=false&key=%s', - $this->apikey)); + $action->script(sprintf('http://maps.google.com/maps?file=api&v=2&sensor=false&key=%s', + urlencode($this->apikey))); break; case 'microsoft': $action->script('http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6'); @@ -137,7 +137,7 @@ class MapstractionPlugin extends Plugin break; case 'yahoo': $action->script(sprintf('http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=%s', - $this->apikey)); + urlencode($this->apikey))); break; case 'geocommons': // don't support this yet default: -- cgit v1.2.3-54-g00ecf From 634752f0d262b4fb02456889250378fca084cd2e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Jun 2010 18:41:17 +0000 Subject: Mapstraction plugin fix: set icon dimensions (24x24 px); Google Maps provider otherwise defaults to stretching them to a funny shape instead of showing square avatars. --- plugins/Mapstraction/usermap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Mapstraction') diff --git a/plugins/Mapstraction/usermap.js b/plugins/Mapstraction/usermap.js index 4b7a6c26b..53cfe6bb0 100644 --- a/plugins/Mapstraction/usermap.js +++ b/plugins/Mapstraction/usermap.js @@ -104,7 +104,7 @@ function showMapstraction(element, notices) { pt = new mxn.LatLonPoint(lat, lon); mkr = new mxn.Marker(pt); - mkr.setIcon(n['user']['profile_image_url']); + mkr.setIcon(n['user']['profile_image_url'], [24, 24]); mkr.setInfoBubble('' + n['user']['screen_name'] + '' + ' ' + n['html'] + '
'+ n['created_at'] + ''); -- cgit v1.2.3-54-g00ecf