Coder Social home page Coder Social logo

Comments (3)

tim-salabim avatar tim-salabim commented on August 16, 2024

I think this would need to be implemented in leaflet, rather than here. IIRC there's already an issue on the leaflet github repo asking for this. Did you have a look there?

from mapview.

agronomofiorentini avatar agronomofiorentini commented on August 16, 2024

Dear @tim-salabim, always ready to help.

I haven't had a look yet to the leaflet github repo actually and i will take a look. Anyway thanks.

from mapview.

agronomofiorentini avatar agronomofiorentini commented on August 16, 2024

@tim-salabim

I have this code that i want to show you and it's full reproducible code

library(plainview)
library(leaflet)

poppendorf

map<-leaflet() %>%
  leaflet::addProviderTiles(provider = providers$OpenStreetMap, group = "Google Maps") %>%
  leaflet::addProviderTiles(provider = providers$Esri.WorldImagery, group = "Satellite")

names<-names(poppendorf)

for (i in seq(from=1,by=1,to=length(names))) {
  map<-map %>%
    addRasterImage(poppendorf[[names[i]]], group = names[i])
}

There are three different options that don't allow us to set what we would like to achieve "A leaflet map that allow us to have radiobuttons for both baseGroups and overlayGroups "

1

map<-map %>%
  addLayersControl(
    position = c("topleft"),
    baseGroups = names,
    overlayGroups = c("Satellite", "Google Maps"),
    options = layersControlOptions(collapsed = F, autoZIndex = F)
  )

map

2

map<-map %>%
  addLayersControl(
    position = c("topleft"),
    baseGroups = c("Satellite", "Google Maps", names),
    options = layersControlOptions(collapsed = F, autoZIndex = F)
  )

map

3

map<-map %>%
  addLayersControl(
    position = c("topleft"),
    baseGroups = c("Satellite", "Google Maps", names),
    options = layersControlOptions(collapsed = F, autoZIndex = F)
  )

map

Can you please paste here below the link of the github issue that you refered before?

from mapview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.