Optimising custom marker image performance with Google Maps SDK for iOS

前端 未结 3 882
深忆病人
深忆病人 2021-01-04 02:43

I have recently been incorporating the Google Maps for iOS SDK within an iOS app. This app is designed to retrieve position of aircraft (including aircraft model, lat/lng, s

3条回答
  •  攒了一身酷
    2021-01-04 03:24

    My solve; ((null)) was false: Reached the max number of texture atlases, can not allocate more.

    You keep location information out of the thread while creating the markers.

    OperationQueue.main.addOperation {
        let coordinates = CLLocationCoordinate2D(latitude:LatData!, longitude: longData!)
        let marker = GMSMarker(position: coordinates)
        marker.icon = GMSMarker.markerImage(with: .blue)
    
        for i in 0 ... self.DemandLong.count {
            marker.infoWindowAnchor = CGPoint(x: 0, y: 5)
            marker.map = self.MyExploreView
    
            marker.accessibilityLabel = "\(i)" //Marker Label
            print("Location Marker i:\(i)")
        }
    }
    

提交回复
热议问题