This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| shinyServer(function(input, output, session) { | |
| # Keep general informations | |
| userTabsInfo <- reactiveValues() | |
| userTabsInfo$selectedTabTitle <- NULL # latest created tab | |
| userTabsInfo$tabsOrder <- list('firstTab') # list of tabs in the order of their creation | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(shiny) | |
| require(sp) | |
| require(rgdal) | |
| runApp( | |
| list( | |
| ui = bootstrapPage( | |
| fileInput('inputdata', 'Input file',accept=c('.csv')), | |
| plotOutput("xyPlot"), | |
| downloadButton('downloadShp', 'DownloadSHP') | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| output$downloadShp <- downloadHandler( | |
| filename = 'fbCrawlExport.zip', | |
| content = function(file) { | |
| if (length(Sys.glob("fbCrawl.*"))>0){ | |
| file.remove(Sys.glob("fbCrawl.*")) | |
| } | |
| writeOGR(getGeoContent(), dsn="fbCrawl.shp", layer="fbCrawl", driver="ESRI Shapefile") | |
| write.csv(as.data.frame(cbind(getGeoContent()@data, as.data.frame(getGeoContent()@coords))), "fbCrawl.csv") | |
| zip(zipfile='fbCrawlExport.zip', files=Sys.glob("fbCrawl.*")) | |
| file.copy("fbCrawlExport.zip", file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tabPanel("Maps", | |
| tags$div(class="span4",selectInput("LatColumnSelected", "Latitude column :",choices="", multiple=FALSE)), | |
| tags$div(class="span4",selectInput("LongColumnSelected", "Longitude column:",choices="", multiple=FALSE)), | |
| selectInput('sizeAttribute', 'Scales points on :', choices="", multiple=FALSE), | |
| htmlOutput('webmap'), | |
| div(id='map',style='width: 100%; height: 600px;'), | |
| div(id='status'), | |
| sliderInput('maxSize', 'Max. point size', value=25, min=1, max=100), | |
| plotOutput('ggmap')), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| require(maptools) | |
| shinyServer(function(input, output) { | |
| uploadShpfile <- reactive({ | |
| if (!is.null(input$shpFile)){ | |
| shpDF <- input$shpFile | |
| prevWD <- getwd() | |
| uploadDirectory <- dirname(shpDF$datapath[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <GDAL_WMS> | |
| <Service name="TMS"> | |
| <ServerUrl>http://a.tiles.mapbox.com/v3/adrienvh.hf43flld/${z}/${x}/${y}.png</ServerUrl> | |
| </Service> | |
| <DataWindow> | |
| <UpperLeftX>-20037508.34</UpperLeftX> | |
| <UpperLeftY>20037508.34</UpperLeftY> | |
| <LowerRightX>20037508.34</LowerRightX> | |
| <LowerRightY>-20037508.34</LowerRightY> | |
| <TileLevel>18</TileLevel> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shinyServer(function(input, output,session) { | |
| output$Fbuttons <- renderUI({ | |
| outlist <- list(verbatimTextOutput("Decrease")) | |
| posButtons <- lapply(1:input$n, function(i) { | |
| actionButton(paste0("btnF",i), "+") | |
| }) | |
| outlist <- c(outlist, posButtons) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| shinyServer(function(input, output) { | |
| output$webmap <- renderUI({ | |
| tags$script(sprintf('console.log(%d);', input$obs)) | |
| }) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| outputObj <- "" | |
| brew(mapTemplate, output=textConnection("outputObj")) | |
| return(outputObj) | |
| returns : | |
| Erreur dans brew(mapTemplate, output = textConnection("outputObj")) : | |
| output connection is not writeable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| var map, selectControl, selectedFeature; | |
| function onPopupClose(evt) { | |
| selectControl.unselect(selectedFeature); | |
| }; | |
| function onFeatureSelect(feature) { | |
| selectedFeature = feature; |