tangrams / tangram

WebGL map rendering engine for creative cartography
https://tangram.city
MIT License
2.21k stars 290 forks source link

Buildings don't always fill with v0.4 #210

Closed nvkelso closed 8 years ago

nvkelso commented 9 years ago

Browsing around Washington DC I'm seeing tons of buildings that don't fill (but do stroke) at mid zooms. Zooming into high (neighborhood) zooms they do fill. And sometimes the interior ring (that shouldn't be filled) is filling in at high zooms.

Howard University in DC with v0.4 Tangram shows outline only buildings (a regression):

screen shot 2015-11-03 at 21 40 07

Howard University in DC with v0.3 Tangram draws fill properly:

screen shot 2015-11-03 at 21 39 44

Elsewhere in DC...

Note the Thomas Jefferson Memorial outer ring not filling. Same for Library of Congress.

screen shot 2015-11-03 at 20 11 24 screen shot 2015-11-03 at 20 11 16 screen shot 2015-11-03 at 20 10 59
nvkelso commented 8 years ago

See: http://nvkelso.github.io/tangram-skin-and-bones/#15/38.9237/-77.0191

matteblair commented 8 years ago

I think this may be a styling error. In the buildings layer here, order is specified as a series of stops. This isn't currently supported, as described in the docs, so the polygons that get this rule will not be drawn.

This behavior for invalid orders is new in v0.4. In previous versions, geometries without valid orders would be placed somewhere between orders 0 and 1, but that effect is due to some undefined behavior and can't be relied upon (or reproduced in tangram-es), so we've changed the behavior to make it more clear that the geometry has invalid styling.

@bcamper will know whether or not I'm reasoning correctly about this

meetar commented 8 years ago

@blair1618 has it right – changing order to a simple integer value fixed this for me.

bcamper commented 8 years ago

@blair1618 is correct, I was just summarizing the same. However, I need to add even more order enforcement (probably for 0.4.1), in this case it was mostly "luck", I removed some dead order code in 0.4 and that changed the code path.

meetar commented 8 years ago

(Supporting stops in a order parameter is an interesting idea though!)

On Wed, Nov 4, 2015 at 2:33 PM, Brett Camper notifications@github.com wrote:

@blair1618 https://github.com/blair1618 is correct, I was just summarizing the same. However, I need to add even more order enforcement (probably for 0.4.1), in this case it was mostly "luck", I removed some dead order code in 0.4 and that changed the code path.

— Reply to this email directly or view it on GitHub https://github.com/tangrams/tangram/issues/210#issuecomment-153839879.

bcamper commented 8 years ago

Logged that feature addition here: https://trello.com/c/nWfxK3x6/713-support-stop-interpolation-for-order