I'm trying to plot some GPS points using Rgooglemaps and to create a plot image larger than 640x640px.
Rgooglemaps GetMap has a SCALE
parameter which scales the retrieved google map by up to a factor of two.
Examples: No Scaling & Scaled by 2
Note: The URLs above work intermittently, as Google limits the number of requests allowed without supplying an API key. Just mash F5 until it loads.
If the SCALE
value is anything other than 1 in R, when I plot my data with PlotOnStaticMap, none of my coordinates align properly with the map (the map is scaled up, the points are not).
I realise I can scale the output up by avoiding the SCALE
and specifying:
png('map.png', height=1280, width=1280)
But this extrapolates the default 640x640px image and the result is blurry.
Is there a way to also proportionally scale up a table of coordinates?
It turns out no scaling of the coordinates was needed, just a few extra parameters:-
What I should've been doing:
Note the
size
parameter in thePlotOnStaticMap
function needs to be set to 640x640px, even though the output is double that.