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

[Maps] Mapbox console error #67874

Closed
thomasneirynck opened this issue Jun 1, 2020 · 2 comments · Fixed by #68413
Closed

[Maps] Mapbox console error #67874

thomasneirynck opened this issue Jun 1, 2020 · 2 comments · Fixed by #68413
Assignees
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.8.1 v7.9.0 v8.0.0
Projects

Comments

@thomasneirynck
Copy link
Contributor

Sometimes the following error gets logged to the console when adding layers to the Map

mapbox-gl-csp.js:1 Error: layers.f68ef37a-1d91-400d-bb43-f18b0589e348_circle.paint.circle-radius[5]: Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.
    at qi (mapbox-gl-csp.js:1)
    at e._validate (mapbox-gl-csp.js:1)
    at e.setPaintProperty (mapbox-gl-csp.js:1)
    at e.setPaintProperty (mapbox-gl-csp.js:1)
    at r.setPaintProperty (mapbox-gl-csp.js:1)
    at DynamicSizeProperty.syncCircleRadiusWithMb (dynamic_size_property.js:117)
    at VectorStyle.setMBPaintPropertiesForPoints (vector_style.js:619)
    at VectorLayer._setMbCircleProperties (vector_layer.js:1310)
    at VectorLayer._setMbPointsProperties (vector_layer.js:1240)
    at VectorLayer._syncStylePropertiesWithMb (vector_layer.js:1427)
@thomasneirynck thomasneirynck added bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation labels Jun 1, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@thomasneirynck
Copy link
Contributor Author

This occurs when min-max for size expressions is identical. It should not create an interpolate expression.

e.g.

[
	"interpolate",
	[
		"linear"
	],
	[
		"coalesce",
		[
			"case",
			[
				"==",
				[
					"feature-state",
					"doc_count"
				],
				null
			],
			0,
			[
				"max",
				[
					"min",
					[
						"to-number",
						[
							"feature-state",
							"doc_count"
						]
					],
					1
				],
				1
			]
		],
		0
	],
	1,
	1,
	1,
	8
]

The min-max at the end is 1, but tries to interpolate between 1 and 8 pixels. This needs to be corrected.

@thomasneirynck thomasneirynck added this to To do in Maps Jun 4, 2020
Maps automation moved this from To do to Done Jun 5, 2020
@jensallen jensallen moved this from Done (current version) to Done (past versions) in Maps Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.8.1 v7.9.0 v8.0.0
Projects
No open projects
Maps
  
Done (past versions)
Development

Successfully merging a pull request may close this issue.

2 participants