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

feat: update and run code generator #448

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is generated by
// ./scripts/lib/generate.dart
// GENERATED CODE - DO NOT MODIFY BY HAND
// Generated by ./scripts/lib/generate.dart

package org.maplibre.maplibregl;

Expand All @@ -21,11 +21,9 @@
class LayerPropertyConverter {
static PropertyValue[] interpretSymbolLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "icon-opacity":
Expand Down Expand Up @@ -88,6 +86,9 @@ static PropertyValue[] interpretSymbolLayerProperties(Object o) {
case "icon-allow-overlap":
properties.add(PropertyFactory.iconAllowOverlap(expression));
break;
case "icon-overlap":
properties.add(PropertyFactory.iconOverlap(expression));
break;
case "icon-ignore-placement":
properties.add(PropertyFactory.iconIgnorePlacement(expression));
break;
Expand Down Expand Up @@ -164,6 +165,9 @@ static PropertyValue[] interpretSymbolLayerProperties(Object o) {
case "text-variable-anchor":
properties.add(PropertyFactory.textVariableAnchor(expression));
break;
case "text-variable-anchor-offset":
properties.add(PropertyFactory.textVariableAnchorOffset(expression));
break;
case "text-anchor":
properties.add(PropertyFactory.textAnchor(expression));
break;
Expand Down Expand Up @@ -191,6 +195,9 @@ static PropertyValue[] interpretSymbolLayerProperties(Object o) {
case "text-allow-overlap":
properties.add(PropertyFactory.textAllowOverlap(expression));
break;
case "text-overlap":
properties.add(PropertyFactory.textOverlap(expression));
break;
case "text-ignore-placement":
properties.add(PropertyFactory.textIgnorePlacement(expression));
break;
Expand All @@ -210,11 +217,9 @@ static PropertyValue[] interpretSymbolLayerProperties(Object o) {

static PropertyValue[] interpretCircleLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "circle-radius":
Expand Down Expand Up @@ -266,11 +271,9 @@ static PropertyValue[] interpretCircleLayerProperties(Object o) {

static PropertyValue[] interpretLineLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "line-opacity":
Expand Down Expand Up @@ -334,11 +337,9 @@ static PropertyValue[] interpretLineLayerProperties(Object o) {

static PropertyValue[] interpretFillLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "fill-antialias":
Expand Down Expand Up @@ -378,11 +379,9 @@ static PropertyValue[] interpretFillLayerProperties(Object o) {

static PropertyValue[] interpretFillExtrusionLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "fill-extrusion-opacity":
Expand Down Expand Up @@ -422,11 +421,9 @@ static PropertyValue[] interpretFillExtrusionLayerProperties(Object o) {

static PropertyValue[] interpretRasterLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "raster-opacity":
Expand Down Expand Up @@ -466,11 +463,9 @@ static PropertyValue[] interpretRasterLayerProperties(Object o) {

static PropertyValue[] interpretHillshadeLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "hillshade-illumination-direction":
Expand Down Expand Up @@ -504,11 +499,9 @@ static PropertyValue[] interpretHillshadeLayerProperties(Object o) {

static PropertyValue[] interpretHeatmapLayerProperties(Object o) {
final Map<String, String> data = (Map<String, String>) toMap(o);
final List<PropertyValue> properties = new LinkedList();
final JsonParser parser = new JsonParser();

final List<PropertyValue> properties = new LinkedList<>();
for (Map.Entry<String, String> entry : data.entrySet()) {
final JsonElement jsonElement = parser.parse(entry.getValue());
final JsonElement jsonElement = JsonParser.parseString(entry.getValue());
Expression expression = Expression.Converter.convert(jsonElement);
switch (entry.getKey()) {
case "heatmap-radius":
Expand Down
10 changes: 8 additions & 2 deletions ios/Classes/LayerPropertyConverter.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is generated by
// ./scripts/lib/generate.dart
// GENERATED CODE - DO NOT MODIFY BY HAND
// Generated by ./scripts/lib/generate.dart

import MapLibre

Expand Down Expand Up @@ -48,6 +48,8 @@ class LayerPropertyConverter {
symbolLayer.symbolZOrder = expression
case "icon-allow-overlap":
symbolLayer.iconAllowsOverlap = expression
case "icon-overlap":
symbolLayer.iconOverlap = expression
case "icon-ignore-placement":
symbolLayer.iconIgnoresPlacement = expression
case "icon-optional":
Expand Down Expand Up @@ -96,6 +98,8 @@ class LayerPropertyConverter {
symbolLayer.textRadialOffset = expression
case "text-variable-anchor":
symbolLayer.textVariableAnchor = expression
case "text-variable-anchor-offset":
symbolLayer.textVariableAnchorOffset = expression
case "text-anchor":
symbolLayer.textAnchor = expression
case "text-max-angle":
Expand All @@ -114,6 +118,8 @@ class LayerPropertyConverter {
symbolLayer.textOffset = expression
case "text-allow-overlap":
symbolLayer.textAllowsOverlap = expression
case "text-overlap":
symbolLayer.textOverlap = expression
case "text-ignore-placement":
symbolLayer.textIgnoresPlacement = expression
case "text-optional":
Expand Down
Loading
Loading