Any chance in getting this fixed or some kind of workaround? I am running into the exact same issue and would love to do a Xamarin.iOS app for my current client but we cannot choose your framework unless we can use the Google Maps API.
I just updated the bindings to version 1.1.0, please note that I have not updated the sample yet. Hope this helps
great!.. just checking the updated bindings, and trying to run a sample app but it crashes with the follwing line of code :
mapView = new GMSMapView();
I must say, thank you very much for the quick turnaround. I will give these new bindings a shot tonight and let you know how they go. Just my developer curiosity, but what does "updating the bindings" entail? Is that an internal Xamarain script or something that basically automates #3 from the page below? http://docs.xamarin.com/guides/ios/advanced_topics/native_interop
joseplj - if you run a debug version do you get an exception regarding a valid API key? If so, make sure you have a key from following this guide: https://developers.google.com/maps/documentation/ios/start
thanks for the answer, I also get the error by running in debug mode.
I get the following exception :
0 GoogleMapsSample 0x00243c9c mono_handle_native_sigsegv + 284
1 GoogleMapsSample 0x001b7d32 mono_sigsegv_signal_handler + 178
2 libsystem_c.dylib 0x9b7df59b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 GoogleMapsSample 0x0031ecbe mono_runtime_invoke + 126
5 GoogleMapsSample 0x003c86af monotouch_throw_monotouch_exception + 63
6 GoogleMapsSample 0x003c8748 monotouch_exception_handler + 136
7 CoreFoundation 0x048df318 __handleUncaughtException + 728
8 libobjc.A.dylib 0x04a8c0b9 _ZL15_objc_terminatev + 86
9 libstdc++.6.dylib 0x0471c652 _ZSt9terminatev + 21
10 libobjc.A.dylib 0x04a8c039 _destroyAltHandlerList + 0
11 libdispatch.dylib 0x04e27027 _dispatch_client_callout + 33
12 libdispatch.dylib 0x04e17418 _dispatch_queue_drain + 239
13 libdispatch.dylib 0x04e172a6 _dispatch_queue_invoke + 59
14 libdispatch.dylib 0x04e18280 _dispatch_root_queue_drain + 231
15 libdispatch.dylib 0x04e17fcb _dispatch_worker_thread3 + 20
16 libsystem_c.dylib 0x9b789b24 _pthread_wqthread + 346
17 libsystem_c.dylib 0x9b78b6fe start_wqthread + 30
Got a SIGSEGV while executing native code. This usually indicates....
I just downloaded the latest bindings from github, I did the steps explained at readme file :
1. Run make prepare command inside binding directory
2. Open GoogleMaps.csproj on Xamarin Studio
3. Build the project
And then change the code into the demo for the GMSCameraPosition object, which was GMSCamera before, and its params by : GMSCameraPosition camera = new GMSCameraPosition(new CLLocationCoordinate2D(37.797865, -122.402526), 6,100,100); mapView = GMSMapView.FromCamera(RectangleF.Empty, camera);
GMSCameraPosition camera = new GMSCameraPosition(new CLLocationCoordinate2D(37.797865, -122.402526), 6,100,100); mapView = GMSMapView.FromCamera(RectangleF.Empty, camera);
And also added the Api key at the AppDelegate class.
Should the sample at the github work as is?
Hello @Pep yes thats totally my fault I'm fixing it right now, will let you know when it is uploaded
Hello @Erik you can learn to do your own bindings here. This document will show you the magic
@dalexsoto Thanks for that link. I look forward to your fix for Pep's new issue.
I ran into the same thing as Pep. Dunno if it helps but this is the error I get. Same line of code as his, the c'tor of the GMSMapView.
2013-02-27 21:23:30.519 GoogleMapsSample[7324:21b03] -[GMSVectorMapViewBridge init]: unrecognized selector sent to instance 0xba0bc50 2013-02-27 21:23:30.680 GoogleMapsSample[7324:28003] Google Maps SDK for iOS version: 22.214.171.1240
Here is the callstack:
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[GMSVectorMapViewBridge init]: unrecognized selector sent to instance 0xba0bc50 at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:IntPtr_objc_msgSend (intptr,intptr) at GoogleMaps.GMSMapView..ctor () [0x00000] in <filename unknown>:0 at GoogleMapsSample.MapViewController.ViewDidLoad () [0x0003a] in /Users/esunder/Downloads/GoogleMaps/GoogleMapsSample/MapViewController.cs:21 at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr) at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIWindow.g.cs:126 at GoogleMapsSample.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00030] in /Users/esunder/Downloads/GoogleMaps/GoogleMapsSample/AppDelegate.cs:35 at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string,intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38 at GoogleMapsSample.Application.Main (System.String args) [0x00000] in /Users/esunder/Downloads/GoogleMaps/GoogleMapsSample/Main.cs:17
@Erik @Pep this should be working now, I also updated sample to reflect api changes.
Please let me know if this works for you.
great! it's working fine now !!
Do you know if there's an easy way to get the latitude and longitude which is specified at the CLLocationCoordinate2D from specific address (as string) ?
Thanks again !
@Pep I believe that is called geocoding. It looks like google has an API for that. Check out this thread for more info:
Btw, I got the new bindings and example project working this weekend. Thanks Alex!
@Erik @Pep Great news!! Please note currently this will work only on simulator not on device due to a Google's Bug. Star this bug so google can fix it quickly.
Ok, thanks for he advise @dalexsoto.
And also thanks for the info about geocoding @Erik.
Hello @Erik and @Pep Just wanted to let you know that Google is fixing this issue in their upcoming release, but for now there is a temporary workaround that you can find on the bindings repo
Hello guys just to let you know that Google Maps its available in our Components Store
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies