Learn R Programming

plotGoogleMaps (version 1.3)

ellipseGoogleMaps: Create a ellipses plot from spatial points data frame on Google Maps, by using three attributes: semi-major axis, semi-minor axis, and orientation in degrees.

Description

Plot htm output with Google Maps API in form of ellipses plot of spatial data. Ready to use as local htm file or into your own website.

Usage

ellipseGoogleMaps(SP, 
                  filename = '', 
                  zcol = 1:3, 
                  add = F, 
                  previousMap = NULL, 
                  scale_e = 10, 
                  colPalette = NULL, 
                  strokeColor = '#FFAA00', 
                  strokeOpacity = 1, 
                  strokeWeight = 1, 
                  geodesic = TRUE, 
                  clickable = TRUE,  
                  zIndex = 'null', 
                   map.width = '80%',
                   map.height = '100%', 
                   layerName = '', 
                   control.width = '20%', 
                   control.height = '100%',
                  zoom = 15, 
                  fitBounds = TRUE, 
                  mapTypeId = 'HYBRID', 
                  disableDoubleClickZoom = FALSE, 
                  draggable = TRUE, 
                  keyboardShortcuts = TRUE, 
                  mapTypeControlOptions = 'DEFAULT', 
                  navigationControl = TRUE, 
                  navigationControlOptions = 'DEFAULT', 
                  scaleControlOptions = 'STANDARD', 
                  noClear = FALSE, 
                  scrollwheel = TRUE, 
                  streetViewControl = FALSE)

Arguments

Value

This function returns a list with HTML, JavaScript, Google Maps API key and else what is necessary for the final web map. The second output is htm file ready to use stored in working direcoty.

See Also

plotGoogleMaps, segmentGoogleMaps, bubbleGoogleMaps

Examples

Run this code
# Data preparation
    ell<- data.frame(E=c(7456263,7456489,7456305),N=c(4954146,4952978,4952695),A=c( 2.96,4.55,7.10),B=c(2.35,2.11,2.29),teta=c(28.35242,41.04491,38.47216))
    coordinates(ell) <- ~E+N
    proj4string(ell) <- CRS("+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=574.027,170.175,401.545,4.88786,-0.66524,-13.24673,0.99999311067 +units=m")
    
    m<-ellipseGoogleMaps(ell,filename="Ellipse.htm",mapTypeId='ROADMAP')
# see results in your working directory

Run the code above in your browser using DataLab