openmobilemaps / maps-core

The lightweight and modern Map SDK for Android and iOS
https://openmobilemaps.io
Mozilla Public License 2.0
163 stars 17 forks source link

3.0 RC issues #650

Closed serhii-londar closed 1 month ago

serhii-londar commented 1 month ago

Hi, I've just tried to launch latest 3.0 RC code with 3d map and here is the results:

import UIKit
import MapCore

class ViewController: UIViewController {
    lazy var mapView = MCMapView(is3D: true)
    override func loadView() { view = mapView }

    override func viewDidLoad() {
        super.viewDidLoad()
        mapView.add(layer: TiledRasterLayer("osm", webMercatorUrlFormat: "https://tile.openstreetmap.org/{z}/{x}/{y}.png"))
    }
}

Simulator Screenshot - iPhone 16 Pro - 2024-10-29 at 15 02 39 Simulator Screenshot - iPhone 16 Pro - 2024-10-29 at 15 02 37

I'm pretty sure I'm doing something wrong, but If so please help. Thanks in advance!

maerki commented 1 month ago

Hi. The default configuration is not suitable for 3D. You can configure your map like this:

MCMapView(
    mapConfig: .init(
      mapCoordinateSystem: MCCoordinateSystemFactory.getUnitSphereSystem()
    ),
    is3D: true
  )

Thanks for the feedback. We'll change the default for 3D to be more suitable with the next release.