Skip to content

Example app cleanup #96

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,56 +178,68 @@ fun parseAnimationCurve(value: String): AnimationCurve {
}
}

fun BasemapStyle.getJsonValue(): String? {
fun BasemapStyle.getJsonValue(): String {
return when (this) {
BasemapStyle.ArcGISImagery -> "arcgisImagery"
BasemapStyle.ArcGISImageryStandard -> "arcgisImageryStandard"
BasemapStyle.ArcGISImageryLabels -> "arcgisImageryLabels"
BasemapStyle.ArcGISLightGray -> "arcgisLightGray"
BasemapStyle.ArcGISLightGray -> null
BasemapStyle.ArcGISLightGrayLabels -> null
BasemapStyle.ArcGISLightGrayBase -> "arcgisLightGrayBase"
BasemapStyle.ArcGISLightGrayLabels -> "arcgisLightGrayLabels"
BasemapStyle.ArcGISDarkGray -> "arcgisDarkGray"
BasemapStyle.ArcGISDarkGrayBase -> null
BasemapStyle.ArcGISDarkGrayLabels -> null
BasemapStyle.ArcGISDarkGrayBase -> "arcgisDarkGrayBase"
BasemapStyle.ArcGISDarkGrayLabels -> "arcgisDarkGrayLabels"
BasemapStyle.ArcGISNavigation -> "arcgisNavigation"
BasemapStyle.ArcGISNavigationNight -> "arcgisNavigationNight"
BasemapStyle.ArcGISStreets -> "arcgisStreets"
BasemapStyle.ArcGISStreetsRelief -> "arcgisStreetsRelief"
BasemapStyle.ArcGISStreetsReliefBase -> "arcgisStreetsReliefBase"
BasemapStyle.ArcGISStreetsNight -> "arcgisStreetsNight"
BasemapStyle.OsmStreetsRelief -> "arcgisStreetsRelief"
BasemapStyle.ArcGISTopographic -> "arcgisTopographic"
BasemapStyle.ArcGISTopographicBase -> "arcgisTopographicBase"
BasemapStyle.ArcGISOceans -> "arcgisOceans"
BasemapStyle.ArcGISOceansBase -> null
BasemapStyle.ArcGISOceansLabels -> null
BasemapStyle.ArcGISOceansBase -> "arcgisOceansBase"
BasemapStyle.ArcGISOceansLabels -> "arcgisOceansLabels"
BasemapStyle.ArcGISTerrain -> "arcgisTerrain"
BasemapStyle.ArcGISTerrainBase -> null
BasemapStyle.ArcGISTerrainDetail -> null
BasemapStyle.ArcGISTerrainBase -> "arcgisTerrainBase"
BasemapStyle.ArcGISTerrainDetail -> "arcgisTerrainDetail"
BasemapStyle.ArcGISCommunity -> "arcgisCommunity"
BasemapStyle.ArcGISChartedTerritory -> "arcgisChartedTerritory"
BasemapStyle.ArcGISChartedTerritoryBase -> "arcgisChartedTerritoryBase"
BasemapStyle.ArcGISColoredPencil -> "arcgisColoredPencil"
BasemapStyle.ArcGISNova -> "arcgisNova"
BasemapStyle.ArcGISModernAntique -> "arcgisModernAntique"
BasemapStyle.ArcGISModernAntiqueBase -> "arcgisModernAntiqueBase"
BasemapStyle.ArcGISMidcentury -> "arcgisMidcentury"
BasemapStyle.ArcGISNewspaper -> "arcgisNewspaper"
BasemapStyle.ArcGISHillshadeLight -> "arcgisHillshadeLight"
BasemapStyle.ArcGISHillshadeDark -> "arcgisHillshadeDark"
BasemapStyle.ArcGISStreetsReliefBase -> null
BasemapStyle.ArcGISTopographicBase -> null
BasemapStyle.ArcGISChartedTerritoryBase -> null
BasemapStyle.ArcGISModernAntiqueBase -> null
BasemapStyle.ArcGISOutdoor -> "arcgisOutdoor"
BasemapStyle.ArcGISHumanGeography -> "arcgisHumanGeography"
BasemapStyle.ArcGISHumanGeographyBase -> "arcgisHumanGeographyBase"
BasemapStyle.ArcGISHumanGeographyDetail -> "arcgisHumanGeographyDetail"
BasemapStyle.ArcGISHumanGeographyLabels -> "arcgisHumanGeographyLabels"
BasemapStyle.ArcGISHumanGeographyDark -> "arcgisHumanGeographyDark"
BasemapStyle.ArcGISHumanGeographyDarkBase -> "arcgisHumanGeographyDarkBase"
BasemapStyle.ArcGISHumanGeographyDarkDetail -> "arcgisHumanGeographyDarkDetail"
BasemapStyle.ArcGISHumanGeographyDarkLabels -> "arcgisHumanGeographyDarkLabels"
BasemapStyle.OsmStandard -> "osmStandard"
BasemapStyle.OsmStandardRelief -> "osmStandardRelief"
BasemapStyle.OsmStandardReliefBase -> null
BasemapStyle.OsmStandardReliefBase -> "osmStandardReliefBase"
BasemapStyle.OsmStreets -> "osmStreets"
BasemapStyle.OsmStreetsRelief -> "osmStreetsRelief"
BasemapStyle.OsmStreetsReliefBase -> null
BasemapStyle.OsmStreetsReliefBase -> "osmStreetsReliefBase"
BasemapStyle.OsmLightGray -> "osmLightGray"
BasemapStyle.OsmLightGrayBase -> null
BasemapStyle.OsmLightGrayLabels -> null
BasemapStyle.OsmLightGrayBase -> "osmLightGrayBase"
BasemapStyle.OsmLightGrayLabels -> "osmLightGrayLabels"
BasemapStyle.OsmDarkGray -> "osmDarkGray"
BasemapStyle.OsmDarkGrayBase -> null
BasemapStyle.OsmDarkGrayLabels -> null
BasemapStyle.OsmHybrid -> "hybrid"
else -> null
BasemapStyle.OsmDarkGrayBase -> "osmDarkGrayBase"
BasemapStyle.OsmDarkGrayLabels -> "osmDarkGrayLabels"
BasemapStyle.OsmBlueprint -> "osmBlueprint"
BasemapStyle.OsmHybrid -> "osmHybrid"
BasemapStyle.OsmHybridDetail -> "osmHybridDetail"
BasemapStyle.OsmNavigation -> "osmNavigation"
BasemapStyle.OsmNavigationDark -> "osmNavigationDark"
}
}

Expand All @@ -237,31 +249,62 @@ fun parseBasemapStyle(value: String): BasemapStyle? {
"arcgisImageryStandard" -> BasemapStyle.ArcGISImageryStandard
"arcgisImageryLabels" -> BasemapStyle.ArcGISImageryLabels
"arcgisLightGray" -> BasemapStyle.ArcGISLightGray
"arcgisLightGrayBase" -> BasemapStyle.ArcGISLightGrayBase
"arcgisLightGrayLabels" -> BasemapStyle.ArcGISLightGrayLabels
"arcgisDarkGray" -> BasemapStyle.ArcGISDarkGray
"arcgisDarkGrayBase" -> BasemapStyle.ArcGISDarkGrayBase
"arcgisDarkGrayLabels" -> BasemapStyle.ArcGISDarkGrayLabels
"arcgisNavigation" -> BasemapStyle.ArcGISNavigation
"arcgisNavigationNight" -> BasemapStyle.ArcGISNavigationNight
"arcgisStreets" -> BasemapStyle.ArcGISStreets
"arcgisStreetsRelief" -> BasemapStyle.ArcGISStreetsRelief
"arcgisStreetsReliefBase" -> BasemapStyle.ArcGISStreetsReliefBase
"arcgisStreetsNight" -> BasemapStyle.ArcGISStreetsNight
"arcgisStreetsRelief" -> BasemapStyle.OsmStreetsRelief
"arcgisTopographic" -> BasemapStyle.ArcGISTopographic
"arcgisTopographicBase" -> BasemapStyle.ArcGISTopographicBase
"arcgisOceans" -> BasemapStyle.ArcGISOceans
"arcgisOceansBase" -> BasemapStyle.ArcGISOceansBase
"arcgisOceansLabels" -> BasemapStyle.ArcGISOceansLabels
"arcgisTerrain" -> BasemapStyle.ArcGISTerrain
"arcgisTerrainBase" -> BasemapStyle.ArcGISTerrainBase
"arcgisTerrainDetail" -> BasemapStyle.ArcGISTerrainDetail
"arcgisCommunity" -> BasemapStyle.ArcGISCommunity
"arcgisChartedTerritory" -> BasemapStyle.ArcGISChartedTerritory
"arcgisChartedTerritoryBase" -> BasemapStyle.ArcGISChartedTerritoryBase
"arcgisColoredPencil" -> BasemapStyle.ArcGISColoredPencil
"arcgisNova" -> BasemapStyle.ArcGISNova
"arcgisModernAntique" -> BasemapStyle.ArcGISModernAntique
"arcgisModernAntiqueBase" -> BasemapStyle.ArcGISModernAntiqueBase
"arcgisMidcentury" -> BasemapStyle.ArcGISMidcentury
"arcgisNewspaper" -> BasemapStyle.ArcGISNewspaper
"arcgisHillshadeLight" -> BasemapStyle.ArcGISHillshadeLight
"arcgisHillshadeDark" -> BasemapStyle.ArcGISHillshadeDark
"arcgisOutdoor" -> BasemapStyle.ArcGISOutdoor
"arcgisHumanGeography" -> BasemapStyle.ArcGISHumanGeography
"arcgisHumanGeographyBase" -> BasemapStyle.ArcGISHumanGeographyBase
"arcgisHumanGeographyDetail" -> BasemapStyle.ArcGISHumanGeographyDetail
"arcgisHumanGeographyLabels" -> BasemapStyle.ArcGISHumanGeographyLabels
"arcgisHumanGeographyDark" -> BasemapStyle.ArcGISHumanGeographyDark
"arcgisHumanGeographyDarkBase" -> BasemapStyle.ArcGISHumanGeographyDarkBase
"arcgisHumanGeographyDarkDetail" -> BasemapStyle.ArcGISHumanGeographyDarkDetail
"arcgisHumanGeographyDarkLabels" -> BasemapStyle.ArcGISHumanGeographyDarkLabels
"osmStandard" -> BasemapStyle.OsmStandard
"osmStandardRelief" -> BasemapStyle.OsmStandardRelief
"osmStandardReliefBase" -> BasemapStyle.OsmStandardReliefBase
"osmStreets" -> BasemapStyle.OsmStreets
"osmStreetsRelief" -> BasemapStyle.OsmStreetsRelief
"osmStreetsReliefBase" -> BasemapStyle.OsmStreetsReliefBase
"osmLightGray" -> BasemapStyle.OsmLightGray
"osmLightGrayBase" -> BasemapStyle.OsmLightGrayBase
"osmLightGrayLabels" -> BasemapStyle.OsmLightGrayLabels
"osmDarkGray" -> BasemapStyle.OsmDarkGray
"hybrid" -> BasemapStyle.OsmHybrid
"osmDarkGrayBase" -> BasemapStyle.OsmDarkGrayBase
"osmDarkGrayLabels" -> BasemapStyle.OsmDarkGrayLabels
"osmBlueprint" -> BasemapStyle.OsmBlueprint
"osmHybrid" -> BasemapStyle.OsmHybrid
"osmHybridDetail" -> BasemapStyle.OsmHybridDetail
"osmNavigation" -> BasemapStyle.OsmNavigation
"osmNavigationDark" -> BasemapStyle.OsmNavigationDark
else -> null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,9 @@ extension Basemap.Style: CaseIterable {
.arcGISStreets,
.arcGISStreetsNight,
.arcGISStreetsRelief,
.arcGISStreetsReliefBase,
.arcGISTopographic,
.arcGISTopographicBase,
.arcGISOceans,
.arcGISOceansBase,
.arcGISOceansLabels,
Expand All @@ -624,29 +626,41 @@ extension Basemap.Style: CaseIterable {
.arcGISTerrainDetail,
.arcGISCommunity,
.arcGISChartedTerritory,
.arcGISChartedTerritoryBase,
.arcGISColoredPencil,
.arcGISNova,
.arcGISModernAntique,
.arcGISModernAntiqueBase,
.arcGISMidcentury,
.arcGISNewspaper,
.arcGISHillshadeLight,
.arcGISHillshadeDark,
.arcGISStreetsReliefBase,
.arcGISTopographicBase,
.arcGISChartedTerritoryBase,
.arcGISModernAntiqueBase,
.arcGISOutdoor,
.arcGISHumanGeography,
.arcGISHumanGeographyBase,
.arcGISHumanGeographyDetail,
.arcGISHumanGeographyLabels,
.arcGISHumanGeographyDark,
.arcGISHumanGeographyDarkBase,
.arcGISHumanGeographyDarkDetail,
.arcGISHumanGeographyDarkLabels,
.osmStandard,
.osmStandardRelief,
.osmStandardReliefBase,
.osmStreets,
.osmStreetsRelief,
.osmStreetsReliefBase,
.osmLightGray,
.osmLightGrayBase,
.osmLightGrayLabels,
.osmDarkGray,
.osmDarkGrayBase,
.osmDarkGrayLabels,
.osmStreetsReliefBase
.osmBlueprint,
.osmHybrid,
.osmHybridDetail,
.osmNavigation,
.osmNavigationDark,
]
}
}
Expand All @@ -663,49 +677,57 @@ extension Basemap.Style {
case .arcGISLightGray:
return "arcgisLightGray"
case .arcGISLightGrayBase:
return "arcgisDarkGray"
return "arcgisLightGrayBase"
case .arcGISLightGrayLabels:
return nil
return "arcgisLightGrayLabels"
case .arcGISDarkGray:
return nil
return "arcgisDarkGray"
case .arcGISDarkGrayBase:
return nil
return "arcgisDarkGrayBase"
case .arcGISDarkGrayLabels:
return nil
return "arcgisDarkGrayLabels"
case .arcGISNavigation:
return "arcgisNavigation"
case .arcGISNavigationNight:
return "arcgisNavigationNight"
case .arcGISStreets:
return "arcgisStreets"
case .arcGISStreetsNight:
return "arcgisStreetsNight"
case .arcGISStreetsRelief:
return "arcgisStreetsRelief"
case .arcGISStreetsReliefBase:
return "arcgisStreetsReliefBase"
case .arcGISStreetsNight:
return "arcgisStreetsNight"
case .arcGISTopographic:
return "arcgisTopographic"
case .arcGISTopographicBase:
return "arcgisTopographicBase"
case .arcGISOceans:
return "arcgisOceans"
case .arcGISOceansBase:
return nil
return "arcgisOceansBase"
case .arcGISOceansLabels:
return nil
return "arcgisOceansLabels"
case .arcGISTerrain:
return "arcgisTerrain"
case .arcGISTerrainBase:
return nil
return "arcgisTerrainBase"
case .arcGISTerrainDetail:
return nil
return "arcgisTerrainDetail"
case .arcGISCommunity:
return "arcgisCommunity"
case .arcGISChartedTerritory:
return "arcgisChartedTerritory"
case .arcGISChartedTerritoryBase:
return "arcgisChartedTerritoryBase"
case .arcGISColoredPencil:
return "arcgisColoredPencil"
case .arcGISNova:
return "arcgisNova"
case .arcGISModernAntique:
return "arcgisModernAntique"
case .arcGISModernAntiqueBase:
return "arcgisModernAntiqueBase"
case .arcGISMidcentury:
return "arcgisMidcentury"
case .arcGISNewspaper:
Expand All @@ -714,14 +736,24 @@ extension Basemap.Style {
return "arcgisHillshadeLight"
case .arcGISHillshadeDark:
return "arcgisHillshadeDark"
case .arcGISStreetsReliefBase:
return nil
case .arcGISTopographicBase:
return nil
case .arcGISChartedTerritoryBase:
return nil
case .arcGISModernAntiqueBase:
return nil
case .arcGISOutdoor:
return "arcgisOutdoor"
case .arcGISHumanGeography:
return "arcgisHumanGeography"
case .arcGISHumanGeographyBase:
return "arcgisHumanGeographyBase"
case .arcGISHumanGeographyDetail:
return "arcgisHumanGeographyDetail"
case .arcGISHumanGeographyLabels:
return "arcgisHumanGeographyLabels"
case .arcGISHumanGeographyDark:
return "arcgisHumanGeographyDark"
case .arcGISHumanGeographyDarkBase:
return "arcgisHumanGeographyDarkBase"
case .arcGISHumanGeographyDarkDetail:
return "arcgisHumanGeographyDarkDetail"
case .arcGISHumanGeographyDarkLabels:
return "arcgisHumanGeographyDarkLabels"
case .osmStandard:
return "osmStandard"
case .osmStandardRelief:
Expand All @@ -732,22 +764,31 @@ extension Basemap.Style {
return "osmStreets"
case .osmStreetsRelief:
return "osmStreetsRelief"
case .osmStreetsReliefBase:
return "osmStreetsReliefBase"
case .osmLightGray:
return "osmLightGray"
case .osmLightGrayBase:
return nil
return "osmLightGrayBase"
case .osmLightGrayLabels:
return nil
return "osmLightGrayLabels"
case .osmDarkGray:
return "osmDarkGray"
case .osmDarkGrayBase:
return nil
return "osmDarkGrayBase"
case .osmDarkGrayLabels:
return nil
case .osmStreetsReliefBase:
return nil
@unknown default:
return nil
return "osmDarkGrayLabels"
case .osmBlueprint:
return "osmBlueprint"
case .osmHybrid:
return "osmHybrid"
case .osmHybridDetail:
return "osmHybridDetail"
case .osmNavigation:
return "osmNavigation"
case .osmNavigationDark:
return "osmNavigationDark"

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class GraphicsParser {
case "simple-marker":
return parseSimpleMarkerSymbol(dictionary)
case "picture-marker":
return parsePictureMarkerSymbol(dictionary)
return try parsePictureMarkerSymbol(dictionary)
case "simple-fill":
return parseSimpleFillMarkerSymbol(dictionary)
case "simple-line":
Expand Down
Loading
Loading