Add LocationIndicatorLayer

New key is "G" in mbgl-glfw, cycling between no puck, centered
in the viewport and positioned in Tokyo.
This commit is contained in:
Gali Nelle
2020-03-25 17:35:44 +02:00
committed by galinelle
parent 7f53cec17b
commit 9a55c282fe
75 changed files with 3843 additions and 18 deletions

View File

@@ -64,7 +64,7 @@ global.evaluatedType = function (property) {
case 'boolean':
return 'bool';
case 'number':
return 'float';
return /location$/.test(property.name) ? 'double' : 'float';
case 'resolvedImage':
return 'expression::Image';
case 'formatted':
@@ -77,7 +77,7 @@ global.evaluatedType = function (property) {
return `Color`;
case 'array':
if (property.length) {
return `std::array<${evaluatedType({type: property.value})}, ${property.length}>`;
return `std::array<${evaluatedType({type: property.value, name: property.name})}, ${property.length}>`;
} else {
return `std::vector<${evaluatedType({type: property.value, name: property.name})}>`;
}