Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/429.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在闪亮的应用程序中将价值从google地图转移到rchart_Javascript_R_Google Maps_Shiny_Plotgooglemaps - Fatal编程技术网

Javascript 在闪亮的应用程序中将价值从google地图转移到rchart

Javascript 在闪亮的应用程序中将价值从google地图转移到rchart,javascript,r,google-maps,shiny,plotgooglemaps,Javascript,R,Google Maps,Shiny,Plotgooglemaps,我有一个闪亮的应用程序,其中我用plotGoogleMaps和rChart绘制了一张地图,并带有相关的值 到地图中的某些标记,通过rPlot渲染 应用程序用户可以单击地图中的标记以显示工具提示 我希望当他点击标记时,图表中的相关值会突出显示 有人知道如何完成这项任务吗 谢谢。@ R代码可以是这样的: suppressPackageStartupMessages(library(googleVis)) ## Hurricane Andrew (1992) storm track with Goo

我有一个闪亮的应用程序,其中我用plotGoogleMaps和rChart绘制了一张地图,并带有相关的值 到地图中的某些标记,通过rPlot渲染

应用程序用户可以单击地图中的标记以显示工具提示

我希望当他点击标记时,图表中的相关值会突出显示

有人知道如何完成这项任务吗

谢谢。

@

R代码可以是这样的:

suppressPackageStartupMessages(library(googleVis))

## Hurricane Andrew (1992) storm track with Google Maps
AndrewMap <- gvisMap(Andrew, "LatLong", "Tip", options = list(showTip = TRUE, 
showLine = TRUE, enableScrollWheel = TRUE, mapType = "hybrid", useMapTypeControl = TRUE))

print(AndrewMap, "chart")

请提供一个最小的可复制的例子。我在家生病时发布了这个问题,所以我手头没有代码!!问题是:如何从plotGoogleMaps使用的html页面中提取一个值,并将其返回到全局环境,以便在服务器端使用。
# Author: Denis Petrov
# Date: 2014-07-04

# Example is based on http://rpubs.com/gallery/googleVis

library (shiny)
suppressPackageStartupMessages (library (googleVis))

# Define server logic required to summarize and view the selected dataset
shinyServer ( function (input, output, session) 
{
  GetDataAndrew <- function ()
  {

    # Hurricane Andrew (1992) storm track with Google Maps
    AndrewMap <- gvisMap (Andrew, "LatLong", "Tip", 
                         options = list(showTip = TRUE, 
                                        showLine = TRUE, 
                                        enableScrollWheel = TRUE, 
                                        mapType = "hybrid", 
                                        useMapTypeControl = TRUE))

    return (AndrewMap)

  }

  output$viewchart <- renderGvis({
    GetDataAndrew ()
  })

  output$info <- renderPrint ({
    cat ('Hurricane\n')
    cat ('Pressure=937\n')
    cat ('Speed=120')
  })

}
)
# Author: Denis Petrov
# Date: 2014-07-04


# Define UI for dataset viewer application
shinyUI(pageWithSidebar(

  # Application title
  headerPanel('Hurricane Andrew (1992)'),

  # Sidebar with controls to provide a caption, select a dataset, and 
  # specify the number of observations to view. Note that changes made
  # to the caption in the textInput control are updated in the output
  # area immediately as you type
  sidebarPanel(
               p ('Hurricane Andrew (1992) storm track with Google Maps'),
               p ('I would like the following output be changed based on 
                  selected pin.'),
               verbatimTextOutput ('info')
  ),


  # Show the caption, a summary of the dataset and an HTML table with
  # the requested number of observations
  mainPanel(
    htmlOutput ('viewchart')
  )
))