Description Usage Arguments Value Author(s) References See Also
This function creates JavaScript code that adds the specified object as an overlay to the Google Map. This takes place when the JavaScript code is run; not in this call.
This is used when we create (code for) overlay objects
using functions such as gmarker
and gpolyline
. Having created
such objects, we then add them to the map.
These overlay creation functions (in R) support
adding the overlay directly via their addOverlay
parameter.
1 | addOverlay(obj, map = "map", semiColon = TRUE)
|
obj |
a character vector giving the code for the object(s) that are to be added to the map as an overlay(s) |
map |
a character string giving the name of the JavaScript variable used to reference the GMap object. |
semiColon |
a logical value indicating whether to add a semi-colon to the end of the generated JavaScript command. One may want to suppress this if the result of the call is to be used directly within another call. |
A character vector giving the JavaScript call(s) that will add the objects to the map.
Duncan Temple Lang
http://code.google.com/apis/maps/documentation/reference.html and http://code.google.com/apis/maps/documentation/index.html
gpolyline
, gmarker
googleMapsDoc
http://www.omegahat.org/R2GoogleMaps/sampleDocs/sfcabs.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.