heremaps/harp.gl

Adding posteffects hides MapViewPointFeature

Closed this issue · 2 comments

Describe the bug
Adding posteffects hides MapViewPointFeature, the MapViewPointFeature is still there because you can click on it but the image doesn't show. Disabling posteffects shows the MapViewPointFeature.

To Reproduce
Steps to reproduce the behavior:

  1. Add an image and imageTexture to the MapView
  2. Add MapViewPointFeature with icon set as image
  3. Enable either bloom, vignette and sepia (only one of these needs to be enabled, MapViewPointFeature show when outline is enabled)
  4. MapViewPointFeature will not be visible

Expected behavior
To be able to see the MapViewPointFeature

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome, Brave
  • Version: Version 1.20.103 Chromium: 88.0.4324.152

Additional context

map = new MapView({
      canvas,
      theme: {
        extends: '/resources/berlin_tilezen_base.json',
        styles: {
          geojson: [
            {
              when: ['==', ['geometry-type'], 'Point'],
              technique: 'labeled-icon',
              imageTexture: ['get', 'icon'],
              text: ['get', 'text'],
              iconScale: 0.75,
              iconYOffset: 10,
              priority: 1000,
              color: 'black',
              iconMayOverlap: true,
              textMayOverlap: true,
              renderOrder: ['get', 'renderOrder'],
              iconFadeTime: 0,
              textFadeTime: 0,
            },
          ],
        },
        images: {
          companyIcon: {
            url:
              'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDFDMzAuNDkzNCAxIDM5IDkuNTA2NTkgMzkgMjBDMzkgMzAuNDkzNCAzMC40OTM0IDM5IDIwIDM5QzkuNTA2NTkgMzkgMSAzMC40OTM0IDEgMjBDMSA5LjUwNjU5IDkuNTA2NTkgMSAyMCAxWiIgZmlsbD0iI0MzRDQyRSIgc3Ryb2tlPSIjM0MzQzNDIiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTIxLjM0OSAxOC42NlYxMEgxOC42NDlWMTguNjZIMTBWMjEuMzQ4SDE4LjY1MVYzMEgyMS4zNTFWMjEuMzQ0SDMwVjE4LjY2SDIxLjM0OVoiIGZpbGw9IiMzQzNDM0MiLz4KPC9zdmc+Cg==',
            preload: true,
          },
          externalIcon: {
            url:
              'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwIDFDMzAuNDkzNCAxIDM5IDkuNTA2NTkgMzkgMjBDMzkgMzAuNDkzNCAzMC40OTM0IDM5IDIwIDM5QzkuNTA2NTkgMzkgMSAzMC40OTM0IDEgMjBDMSA5LjUwNjU5IDkuNTA2NTkgMSAyMCAxWiIgZmlsbD0iI0MzRDQyRSIgc3Ryb2tlPSIjM0MzQzNDIiBzdHJva2Utd2lkdGg9IjIiLz4KPC9zdmc+Cg==',
            preload: true,
          },
        },
        imageTextures: [
          {
            name: 'companyIcon',
            image: 'companyIcon',
          },
          {
            name: 'externalIcon',
            image: 'externalIcon',
          },
        ],
      },
      target,
      zoomLevel,
      tilt,
    })

 const markersDataSource = new FeaturesDataSource({
      name: 'geojson',
      styleSetName: 'geojson',
      gatherFeatureAttributes: true,
    })
    map.addDataSource(markersDataSource)

    markersDataSource.add(
      new MapViewPointFeature(geo.toGeoPoint() as number[], {
        text: '',
        id: i,
        // If external link then it's an internal company
        icon: company.external ? 'companyIcon' : 'externalIcon',
        renderOrder: 10000,
        company,
      })
    )

map.postEffects = {
      outline: {
        enabled: true,
        ghostExtrudedPolygons: true,
        thickness: 0.004,
        color: '#898989',
      },
      bloom: {
        enabled: true,
        strength: 0.5,
        threshold: 0.83,
        radius: 1,
      },
      vignette: {
        enabled: true,
        offset: 1.0,
        darkness: 1.25,
      },
      sepia: {
        enabled: true,
        amount: 0.33,
      },
    }

Hi @matt-rollinson ,

Thanks for reporting this bug, I ll create an internal ticket for it, and will let know when we will be able to prioritise and work on it.

Best
Frauke

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.