addOverlay: Creates JavaScript call to addOverlay

Description Usage Arguments Value Author(s) References See Also

Description

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.

Usage

1
addOverlay(obj, map = "map", semiColon = TRUE)

Arguments

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.

Value

A character vector giving the JavaScript call(s) that will add the objects to the map.

Author(s)

Duncan Temple Lang

References

http://code.google.com/apis/maps/documentation/reference.html and http://code.google.com/apis/maps/documentation/index.html

See Also

gpolyline, gmarker googleMapsDoc

http://www.omegahat.org/R2GoogleMaps/sampleDocs/sfcabs.html


duncantl/R2GoogleMaps documentation built on May 15, 2019, 5:26 p.m.