Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are points as circles supported? #2

Open
electricsam opened this issue Dec 19, 2022 · 0 comments
Open

Are points as circles supported? #2

electricsam opened this issue Dec 19, 2022 · 0 comments

Comments

@electricsam
Copy link

I'm currently using a MVT layer based on TerriaJs' implementation. I've customized it to support drawing points as circles. However, I would like to use your library as it is more complete than what I am using.

I'm running into an issue though. It seems that with your library, entire tiles are colored, rather than having circles drawn. Polygons seem to work just fine.

Here is my config:

    const exampleConfig = {
      showCanvas: true,
      style: {
        version: 8,
        sources: {
          layer1: {
            type: 'vector',
            tiles: [`${BASE_PATH}${BASE_API}/mvt/{z}/{x}/{y}.pbf`],
            // tiles: ['https://api.mapbox.com/v4/mapbox.82pkq93d/{z}/{x}/{y}.vector.pbf?sku=1012RMlsjWj1O&access_token=pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg'],
          },
        },
        layers: [
          {
            id: 'background',
            type: 'background',
            paint: {
              'background-color': 'transparent',
            },
          },
          {
            id: 'point',
            source: 'layer1',
            'source-layer': 'casts',
            type: 'circle',
            paint: {
              'circle-color': '#11b4da',
              'circle-radius': 4,
              'circle-stroke-width': 1,
              'circle-stroke-color': '#fff',
            },
          },
        ],
      },
    };

And I am using it:

const p = new MVTImageryProvider(exampleConfig);
layers.addImageryProvider(p);

Attached is a screen shot with both my MVT layer and yours. My library is drawing yellow circles, while yours is coloring some tiles entirely teal, rather than drawing teal circles.

Screen Shot 2022-12-19 at 4 44 28 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant