Skip to content

Commit

Permalink
Hotfix for image size (widgets)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfoell committed Jun 26, 2020
1 parent 138a608 commit b3fefb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/WPStrava/StaticMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public static function get_image_tag( $activity, $height = 320, $width = 480, $m
return '';
}

if ( ! $height || ! $width ) {
$height = 320;
$width = 480;
}

$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

0 comments on commit b3fefb5

Please sign in to comment.