Skip to content

Commit

Permalink
chore: update GMSMapView initializer in test app
Browse files Browse the repository at this point in the history
  • Loading branch information
wangela committed Dec 22, 2023
1 parent bdf509d commit a1dd9bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Expand Up @@ -44,7 +44,9 @@ class HeatMapInterpolationViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 145.20, zoom: 5.0)
mapView = GMSMapView.map(withFrame: view.frame, camera: camera)
let options = GMSMapViewOptions()
options.camera = camera
mapView = GMSMapView.init(options: options)
view.addSubview(mapView)
view.bringSubviewToFront(renderButton)
view.bringSubviewToFront(defaultRender)
Expand Down
4 changes: 3 additions & 1 deletion samples/SwiftDemoApp/SwiftDemoApp/ViewController.swift
Expand Up @@ -39,7 +39,9 @@ class ViewController: UIViewController, GMUClusterManagerDelegate, GMSMapViewDel
override func loadView() {
let camera = GMSCameraPosition.cameraWithLatitude(kCameraLatitude,
longitude: kCameraLongitude, zoom: 10)
mapView = GMSMapView.mapWithFrame(CGRect.zero, camera: camera)
let options = GMSMapViewOptions()
options.camera = camera
mapView = GMSMapView.init(options: options)
self.view = mapView
}

Expand Down
4 changes: 3 additions & 1 deletion test/unit/Heatmap/GMUHeatmapTileLayerTest.swift
Expand Up @@ -68,7 +68,9 @@ class GMUHeatmapTileLayerTest: XCTestCase {
heatmapTileLayer.minimumZoomIntensity = 5
heatmapTileLayer.maximumZoomIntensity = 10
let camera = GMSCameraPosition.camera(withLatitude: cameraLatitude, longitude: cameraLongitude, zoom: 4)
heatmapTileLayer.map = GMSMapView.map(withFrame: .zero, camera: camera)
let options = GMSMapViewOptions()
options.camera = camera
heatmapTileLayer.map = GMSMapView.init(options: options)
XCTAssertEqual(gradientColor, heatmapTileLayer.gradient.colors)
XCTAssertNotEqual(weightedData, heatmapTileLayer.weightedData)
XCTAssertEqual(radius, heatmapTileLayer.radius)
Expand Down

0 comments on commit a1dd9bb

Please sign in to comment.