Giter Site home page Giter Site logo

Comments (5)

dcooley avatar dcooley commented on June 9, 2024

Mapbox layer of just streets and labels on top of the polygons.

Do you mean that this 'layer' will only cover the area of the map that also contains the polygons, and the rest of the map will be the 'base' style? If so there's not a native / simple solution, but there are a couple of ways I can think of to achieve this effect:

1. add_bitmap()

from ?add_bitmap example:

library(mapdeck)

set_token(secret::get_secret("MAPBOX"))

mapdeck(location = c(-122.3, 37.8), zoom = 10) %>%
  add_bitmap(
    image = paste0(
      'https://raw.githubusercontent.com/uber-common/deck.gl-data/master/',
      'website/sf-districts.png')
    , bounds = c(-122.519, 37.7045, -122.355, 37.829)
  )

Screenshot 2022-11-10 at 8 06 15 am

2 Custom Mapbox Style

You can make your own custom style - https://docs.mapbox.com/api/maps/styles/ - and set that as the style argument. I'm not too familiar with this method though and whether or not you can only change the style for certain areas and not others.

from mapdeck.

jlehman01 avatar jlehman01 commented on June 9, 2024

Thanks for the quick reply! (and, by the way, thanks for your work on this and other packages!)

I already have mapbox styles set up. I'm essentially looking to layer them, so that I have a basemap layer with a roadway-only layer on the top of the map, with the polygons sandwiched in-between.

Here are functions in other deck gl implementations that I think would accomplish what I'm looking to do (but I prefer mapdeck and think it would be a nice feature add if not currently possible):

from mapdeck.

timathomas avatar timathomas commented on June 9, 2024

@jlehman01 Did you happen to find a solution for this? I too would like to get place names above the basemap and polygons.

from mapdeck.

jlehman01 avatar jlehman01 commented on June 9, 2024

@timathomas I never found a workaround. It is possible to do this in leaflet and tmap so I tend to use those packages when possible.

from mapdeck.

timathomas avatar timathomas commented on June 9, 2024

Thanks @jlehman01. Me too. I've been able to get it to work with the Mapboxapi and Mapboxer packages but still have to edit the underlying data in mapbox studio. @dcooley I too very much appreciate you and your teams work on mapdeck, it's a great package!

from mapdeck.

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.