Giter VIP home page Giter VIP logo

Comments (4)

akacarlyann avatar akacarlyann commented on July 22, 2024

Hi @ankit6883 ! Any chance you can provide a screenshot of what you're seeing? Are you using a CircleViz?

from mapboxgl-jupyter.

ankit6883 avatar ankit6883 commented on July 22, 2024

issueheatmap - copy

there is two colour one is green and other is red but if u see can see more is red but after zoom in u can segregate between both colour but i want from starting
this is code:
map.on('load', function () {
map.addLayer({
"id": "store-location",
"type": "circle",
"source": {
"type": "geojson",
"data": geoShapes,

        },

        "paint": {
            'circle-radius': 3,
            "circle-color": colorMap,
        },
        
        "text-color": "#ffffff",
        "filter": ["==", "$type", "Point"],
    }, 'waterway-label');

from mapboxgl-jupyter.

akacarlyann avatar akacarlyann commented on July 22, 2024

It looks like you are asking about multiple data layers in a single map. Is that right? This is on the roadmap for mapboxgl-jupyter but there's no support for it just yet.

I'd recommend reducing the circle radius size and decreasing the opacity if you want the invisible green points to show through. The other thing you could do is edit the z-order of both layers so that the green points lie on top of your yellow-to-red color mapped points. Hope that helps! Here's how you would initialize the CircleViz with a radius of 1.0 and opacity of 0.5 (50%).

import os
from mapboxgl.utils import *
from mapboxgl.viz import *

# Must be a public token, starting with `pk`
token = os.getenv('MAPBOX_ACCESS_TOKEN')

# define "breaks" for color mapping (I just put in a generic example b/c I don't know the scale of your data)
color_breaks = [0, 10, 100, 1000]

# define color_property, the GeoJSON feature property used to assign color to the point
color_property = '???'

# initialize the MapboxGL-Jupyter map visualization, where geoShapes is a valid GeoJSON object containing point features
viz = CircleViz(geoShapes,
                color_property = color_property,
                color_stops=create_color_stops(color_breaks, colors='YlOrRd'),
                radius = 1,
                opacity=0.5,
                below_layer = 'waterway-label')

viz.show()

from mapboxgl-jupyter.

ryanbaumann avatar ryanbaumann commented on July 22, 2024

Do you have any followup questions @ankit6883 ?

from mapboxgl-jupyter.

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.