@@ -368,21 +368,15 @@ class OpenMapView
368368 /* *
369369 * Sets the type of map tiles that should be displayed.
370370 *
371- * OpenMapView supports a subset of Google Maps map types using free OpenStreetMap
372- * tile sources, plus additional OSM-specific styles.
371+ * OpenMapView provides free OpenStreetMap-based tile sources.
373372 *
374373 * **Supported types:**
375374 * - [MapType.NONE] - No base map tiles
376375 * - [MapType.NORMAL] - Standard road map (default)
377376 * - [MapType.TERRAIN] - Topographic map with contour lines
378377 * - [MapType.HUMANITARIAN] - Humanitarian-focused style
379- * - [MapType.TOPO] - Alias for TERRAIN
380378 * - [MapType.CYCLE] - Cycling-focused map style
381379 *
382- * **Unsupported types (throw exception):**
383- * - [MapType.SATELLITE] - Requires paid satellite imagery API
384- * - [MapType.HYBRID] - Requires paid satellite imagery API
385- *
386380 * When the map type changes, the tile cache is cleared and the map is redrawn.
387381 *
388382 * Example:
@@ -392,7 +386,7 @@ class OpenMapView
392386 * ```
393387 *
394388 * @param type The map type constant from [MapType]
395- * @throws UnsupportedOperationException if type is SATELLITE or HYBRID
389+ * @throws IllegalArgumentException if type is not recognized
396390 * @see MapType
397391 * @see getMapType
398392 */
@@ -402,27 +396,14 @@ class OpenMapView
402396 when (type) {
403397 MapType .NONE -> null
404398 MapType .NORMAL -> TileSource .STANDARD
405- MapType .TERRAIN , MapType . TOPO -> TileSource .TOPO
399+ MapType .TERRAIN -> TileSource .TOPO
406400 MapType .HUMANITARIAN -> TileSource .HUMANITARIAN
407401 MapType .CYCLE -> TileSource .CYCLE
408- MapType .SATELLITE , MapType .HYBRID ->
409- throw UnsupportedOperationException (
410- " Map type $type (${
411- when (type) {
412- MapType .SATELLITE -> " SATELLITE"
413- MapType .HYBRID -> " HYBRID"
414- else -> " unknown"
415- }
416- } ) is not supported. " +
417- " Satellite and hybrid maps require paid tile providers (Mapbox, Google, Bing). " +
418- " OpenMapView only supports free OpenStreetMap tile sources." ,
419- )
420402 else ->
421403 throw IllegalArgumentException (
422404 " Unknown map type: $type . " +
423- " Valid types are: NONE (0), NORMAL (1), TERRAIN (3), " +
424- " HUMANITARIAN (5), TOPO (6), CYCLE (7). " +
425- " SATELLITE (2) and HYBRID (4) are not supported." ,
405+ " Valid types are: NONE (0), NORMAL (1), TERRAIN (2), " +
406+ " HUMANITARIAN (3), CYCLE (4)." ,
426407 )
427408 }
428409 controller.setTileSource(newSource)
0 commit comments