<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/new-version-of-the-openstreetmap-r-pacakge/"></div></div><div><a data-url="https://www.r-bloggers.com/new-version-of-the-openstreetmap-r-pacakge/" data-counturl="https://www.r-bloggers.com/new-version-of-the-openstreetmap-r-pacakge/" data-count="horizontal" data-text="New Version of the OpenStreetMap R Pacakge" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.fellstat.com/?p=394"> Fells Stats</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A new version of the OpenStreetMap package has been released to CRAN. OpenStreetMap 0.3.3 contains several minor improvements. I’ve removed the CloudMade tile set types, as they seem to have gone out of business. MapQuest has also been removed as they have moved to a new API. The mapbox type has been updated to use their new API.</p>
<p>The most important update is the ability to use custom <a target="_blank" href="http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification">tile servers</a>. Suppose you have a server using the tile map service specification with access urls looking something like</p>
<p>http://api.someplace.com/{z}/{x}/{y}.png*</p>
<p>where {z} is the map’s integer zoom level, {x} is the tile’s integer x position and {y} is the tile’s integer y position. You may pass this url into openmap’s type argument to obtain a map using this tileset.</p>
<p>For example, if you need to access MapQuest’s tilesets, which now require a developer API key, you can use the new custom tileserver facility to access them. Below is an example with my (free) API key.</p>
<p> </p>
<pre>ul &lt;- c(40.9,-74.5)
lr &lt;- c(40.1,-73.2)
par(mfrow=c(2,3))
url &lt;- &quot;https://a.tiles.mapbox.com/v4/mapquest.streets-mb/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg&quot;
map &lt;- openmap(ul,lr,minNumTiles=4, type=url)
plot(map)


url &lt;- &quot;https://a.tiles.mapbox.com/v4/mapquest.satellitenolabels/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg&quot;
map &lt;- openmap(ul,lr,minNumTiles=4, type=url)
plot(map)


url &lt;- &quot;https://a.tiles.mapbox.com/v4/mapquest.satellite/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg&quot;
map &lt;- openmap(ul,lr,minNumTiles=4, type=url)
plot(map)

url &lt;- &quot;https://a.tiles.mapbox.com/v4/mapquest.dark/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg&quot;
map &lt;- openmap(ul,lr,minNumTiles=4, type=url)
plot(map)

url &lt;- &quot;https://a.tiles.mapbox.com/v4/mapquest.light/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg&quot;
map &lt;- openmap(ul,lr,minNumTiles=4, type=url)
plot(map)</pre>
<p> </p>
<p><a target="_blank" href="https://i1.wp.com/blog.fellstat.com/wp-content/uploads/2016/09/tmp.png"><img sizes="(max-width: 800px) 100vw, 800px" alt="tmp" class="wp-image-396" src="https://i1.wp.com/blog.fellstat.com/wp-content/uploads/2016/09/tmp.png?resize=456%2C456" data-recalc-dims="1"></a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/new-version-of-the-openstreetmap-r-pacakge/"></div></div><div><a data-url="https://www.r-bloggers.com/new-version-of-the-openstreetmap-r-pacakge/" data-counturl="https://www.r-bloggers.com/new-version-of-the-openstreetmap-r-pacakge/" data-count="vertical" data-text="New Version of the OpenStreetMap R Pacakge" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.fellstat.com/?p=394"> Fells Stats</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/4H5FUFhiOfE"></a></div>