heremaps/harp.gl

big polygon broken in some level?

XkShock opened this issue · 2 comments

I want show a big polygon use tiled data source, when i change the zoom level, the polygon is broken.

a simple polygon:

{
  "type": "Feature",
  "properties": {
    "id": 1,
    "fill": "#ff0000",
    "opacity": 1,
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [0, 0], [0, 10], [10, 10], [10, 0]
      ]
    ]
  }
}

image

when i zoom out, the polygon is broken.

image

code and style:

const map = new MapView({
            canvas,
            target: [0, 0],
            zoomLevel: 6,
            tilt: 50,
            tileCacheSize: 10,
            enablePickTechnique: true,
            tileWrappingEnabled: false,
            theme: {
                extends: "resources/berlin_tilezen_night_reduced.json",
                styles: {
                    geojson: [
                        {
                            layer: "geojson",
                            when: ["!=", ["get", "parentName"], "ground"],
                            renderOrder: ['get', 'zIndex'],
                            technique: "extruded-polygon",
                            transparent: true,
                            defaultHeight: 30000,
                            boundaryWalls: true,
                            lineWidth: 5,
                            lineColor: ['get', 'stroke'],
                            color: ['get', 'fill'],
                            opacity: ['get', 'opacity'],
                            minZoomLevel: 6,
                        }
                  ]
              }
           }
})

@XkShock , did you find the issue?

Sorry I never responded, I posted it in the internal chat we have, but didn't get any response.

@XkShock , did you find the issue?

Sorry I never responded, I posted it in the internal chat we have, but didn't get any response.

I just zoom out coordinates... I think it is caused because of earth projection.