Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

ASMapNode does not show map, mapView nil #1736

@borut-t

Description

@borut-t

Adding ASMapNode() to a view does not show map at all. There is just one gray rectangle presented.
Since there is no documentation about its usage, could you please direct me how to properly integrate ASMapNode to show map view?

Here is the initialization code.

private lazy var mapNode: ASMapNode = {
    let node = ASMapNode()
    node.liveMap = true
    node.mapDelegate = self
    node.preferredFrameSize = CGSize(width: 300, height: 300)

    let coord = CLLocationCoordinate2DMake(37.7749, -122.4194);
    node.region = MKCoordinateRegionMakeWithDistance(coord, 20000, 20000);

    node.mapView?.mapType = MKMapType.Standard
    node.mapView?.showsUserLocation = true

    //self.contentView.addSubview(node.view)
    self.contentView.addSubnode(node)
    return node
}()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions