Skip to content

Commit

Permalink
Added scale=2 to maps image
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfoell committed Aug 2, 2019
1 parent adf1612 commit 4a9b531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/WPStrava/StaticMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function get_image_tag( $activity, $height = 320, $width = 480, $m
return '';
}

$url = "https://maps.googleapis.com/maps/api/staticmap?maptype=terrain&size={$width}x{$height}&sensor=false&key={$key}&path=color:0xFF0000BF|weight:2|enc:";
$url = "https://maps.googleapis.com/maps/api/staticmap?maptype=terrain&size={$width}x{$height}&scale=2&sensor=false&key={$key}&path=color:0xFF0000BF|weight:2|enc:";
$url_len = strlen( $url );
$max_chars = 1865;

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ WP-Strava caches activity for one hour so your site doesn't hit the Strava API o

Added setting to hide elevation.
Fixed hours for activities greater than 24 hours.
Added scale=2 to static map to which allows for greater pixel resolution (up to 1024x1024 at 2x) for Google Maps API Premium Plan subscribers https://developers.google.com/maps/documentation/maps-static/dev-guide#Imagesizes


= 1.7.1 =
Expand Down

0 comments on commit 4a9b531

Please sign in to comment.