Skip to content

Commit 00980e6

Browse files
committed
iOS: Add missing class cast CordovaGoogleMaps for [cdvViewController getCommandInstance:@"CordovaGoogleMaps"]
- Fixes warning: Incompatible pointer types initializing 'CordovaGoogleMaps *' with an expression of type 'CDVPlugin * _Nullable'
1 parent 64b5002 commit 00980e6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/ios/GoogleMaps/PluginEnvironment.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ - (void)setBackGroundColor:(CDVInvokedUrlCommand *)command {
9090
dispatch_async(queue, ^{
9191
// Load the GoogleMap.m
9292
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
93-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
93+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
9494

9595
NSArray *rgbColor = [command.arguments objectAtIndex:0];
9696
dispatch_async(dispatch_get_main_queue(), ^{

src/ios/GoogleMaps/PluginMap.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ - (void)setDiv:(CDVInvokedUrlCommand *)command {
153153

154154
// Load the GoogleMap.m
155155
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
156-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
156+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
157157

158158
// Detach the map view
159159
if ([command.arguments count] == 0) {
@@ -179,7 +179,7 @@ - (void)attachToWebView:(CDVInvokedUrlCommand*)command {
179179

180180
// Load the GoogleMap.m
181181
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
182-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
182+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
183183
[googlemaps.pluginLayer addPluginOverlay:self.mapCtrl];
184184
self.mapCtrl.attached = YES;
185185

@@ -194,7 +194,7 @@ - (void)detachFromWebView:(CDVInvokedUrlCommand*)command {
194194

195195
// Load the GoogleMap.m
196196
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
197-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
197+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
198198
[googlemaps.pluginLayer removePluginOverlay:self.mapCtrl];
199199
self.mapCtrl.attached = NO;
200200

@@ -216,7 +216,7 @@ - (void)resizeMap:(CDVInvokedUrlCommand *)command {
216216

217217
// Load the GoogleMap.m
218218
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
219-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
219+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
220220

221221
// Save the map rectangle.
222222
if (![googlemaps.pluginLayer.pluginScrollView.HTMLNodes objectForKey:self.mapCtrl.divId]) {

src/ios/GoogleMaps/PluginStreetViewPanorama.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ - (void)remove:(CDVInvokedUrlCommand*)command {
188188

189189
// Load the GoogleMap.m
190190
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
191-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
191+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
192192
[googlemaps.pluginLayer removePluginOverlay:self.panoramaCtrl];
193193
self.panoramaCtrl.attached = NO;
194194
self.isRemoved = YES;
@@ -212,7 +212,7 @@ - (void)attachToWebView:(CDVInvokedUrlCommand*)command {
212212

213213
// Load the GoogleMap.m
214214
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
215-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
215+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
216216
[googlemaps.pluginLayer addPluginOverlay:self.panoramaCtrl];
217217
self.panoramaCtrl.attached = YES;
218218

@@ -227,7 +227,7 @@ - (void)detachFromWebView:(CDVInvokedUrlCommand*)command {
227227

228228
// Load the GoogleMap.m
229229
CDVViewController *cdvViewController = (CDVViewController*)self.viewController;
230-
CordovaGoogleMaps *googlemaps = [cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
230+
CordovaGoogleMaps *googlemaps = (CordovaGoogleMaps *)[cdvViewController getCommandInstance:@"CordovaGoogleMaps"];
231231
[googlemaps.pluginLayer removePluginOverlay:self.panoramaCtrl];
232232
self.panoramaCtrl.attached = NO;
233233

0 commit comments

Comments
 (0)