You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[log] - in create map
⚡️ [log] - have ref
To Native Cordova -> Geolocation getLocation Geolocation1810295179 ["options": [0, 0]]
This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first.
⚡️ [log] - have current position for map={
"coords": {
"latitude": 30.46355392733366,
"longitude": -97.62859466229018,
"accuracy": 26.689875241230123,
"altitude": 237.3172779083252,
"heading": null,
"speed": null,
"altitudeAccuracy": 11.927132606506348
},
"timestamp": 1735414885968.9688
}
with try/catch
⚡️ [log] - ready to open map=
⚡️ [log] - map create error= {}
"timestamp": 1735415657940.414
}
without try/catch
⚡️ [log] - ready to open map=
code called from created()
zoomLevel = 15
asynccreateMap(){console.log("in create map");constmapRef=document.getElementById('map');console.log("have ref")// locate where we are constpos=awaitGeolocation.getCurrentPosition({options: {maximumAge: 5*60000,timeout: 5000,enableHighAccuracy: false}})console.log("have current position for map="+JSON.stringify(pos,null,2))this.currentMapCenter.lat=pos.coords.latitudethis.currentMapCenter.lng=pos.coords.longitudeconsole.log("ready to open map=")try{this.newMap=awaitGoogleMap.create({id: 'my-map',// Unique identifier for this map instanceelement: mapRef,// reference to the capacitor-google-map elementapiKey: API_KEY,// Your Google Maps API Keyconfig: {center: {// The initial position to be rendered by the maplat: this.currentMapCenter.lat,lng: this.currentMapCenter.lng},zoom: this.zoomLevel,// The initial zoom level to be rendered by the map}},(mapid)=>{console.log("map is ready, id="+mapid)});console.log("map is "+this.newMap ? "ready" : "not ready")if(this.newMap!=null){console.log("map created")// add a callback for position changed/zoom level this.newMap.setOnBoundsChangedListener(this.zoomChanged);this.newMap.setOnMarkerClickListener(this.markerClicked);this.newMap.enableTrafficLayer(true);this.newMap.enableAccessibilityElements(true);this.newMap.enableCurrentLocation(true);console.log("callback set")// call api with location and range, to get points out of databaseletmarkerList=[]// makerList=await this getInRangeLocations(this.zoomLevel,this.currentMapCenter)markerList.push({coordinate: {lat: this.currentMapCenter.lat,lng: this.currentMapCenter.lng,},title: "current location"})console.log("marker list="+JSON.stringify(markerList))try{awaitthis.newMap.addMarkers(markerList)console.log("markers added");}catch(error){console.log("add markers error="+JSON.stringify(error))}}else{console.log("map was null")}}catch(error){console.log("map create error=",error)}}
Expected Behavior
used to work .
Project Reproduction
no idea yet
Additional Information
i looked in wiki, closed issues, open issues for maps.
The text was updated successfully, but these errors were encountered:
override func viewDidLoad() {
super.viewDidLoad()
let camera = GMSCameraPosition.camera(withLatitude: cameraPosition["latitude"] ?? 0, longitude: cameraPosition["longitude"] ?? 0, zoom: Float(cameraPosition["zoom"] ?? 12))
let frame = CGRect(x: mapViewBounds["x"] ?? 0, y: mapViewBounds["y"] ?? 0, width: mapViewBounds["width"] ?? 0, height: mapViewBounds["height"] ?? 0)
if let id = mapId {
let gmsId = GMSMapID(identifier: id)
self.GMapView = GMSMapView(frame: frame, mapID: gmsId, camera: camera)
} else {
self.GMapView = GMSMapView(frame: frame, camera: camera)
}
self.view = GMapView // should this be self.GMapView? as GMapView isn't defined or set
}
setCamera also failed
⚡️ To Native -> CapacitorGoogleMaps setCamera 33395440
CapacitorGoogleMaps/Map.swift:407: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
if I comment them out, i can add markers, but the map doesn't appear..
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0
Installed Dependencies:
@capacitor/cli: 6.2.0
@capacitor/ios: 6.0.0
@capacitor/android: 6.0.0
@capacitor/core: 6.0.0
[success] iOS looking great! 👌
[success] Android looking great!
Other API Details
Platforms Affected
Current Behavior
[log] - in create map
⚡️ [log] - have ref
To Native Cordova -> Geolocation getLocation Geolocation1810295179 ["options": [0, 0]]
This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the
-locationManagerDidChangeAuthorization:
callback and checkingauthorizationStatus
first.⚡️ [log] - have current position for map={
"coords": {
"latitude": 30.46355392733366,
"longitude": -97.62859466229018,
"accuracy": 26.689875241230123,
"altitude": 237.3172779083252,
"heading": null,
"speed": null,
"altitudeAccuracy": 11.927132606506348
},
"timestamp": 1735414885968.9688
}
with try/catch
⚡️ [log] - ready to open map=
⚡️ [log] - map create error= {}
"timestamp": 1735415657940.414
}
without try/catch
⚡️ [log] - ready to open map=
code called from created()
zoomLevel = 15
Expected Behavior
used to work .
Project Reproduction
no idea yet
Additional Information
i looked in wiki, closed issues, open issues for maps.
The text was updated successfully, but these errors were encountered: