chgrl/leafletR — pull request #3 by cuche27 (2014-08-05 21:32:04+00:00)
Title: Add custom base maps

## New function: AddBaseMap

User can add its own base maps to the list of basemaps available in the leaflet function with the new "addBaseMap" function. For instance:

```
addBaseMap(
shortname="myosm",
name="Duplicated OpenStreetMap",
url = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
options = list(
attribution='© OpenStreetMap contributors'
)
)
```
will create a new basemap called "myosm". This new layer can then be used in the leaflet function:
```
browseURL(leaflet(base.map = "myosm"))
```

## Rewrite of leafletint script

The script leafletint was very hard to read and to change. So, to be able to modify it without breaking everything, I decided to rewrite it.

Instead of directly generating html, the script uses a template file and the brew package to generate it. I also simplified some parts of the code so now the script is 30% smaller.

I hope this will help maintain and debug the code.