Click on map places
Clicking on some places like bus stations, atm, subways don't do anything. I need to know if i can show some infos like what buses are stopping in that stations. Thank you!
Since Google does not provide the listener for POIs clicking for iOS, I havn't implemented it.
But it dosen't work in android too. I clicked on POI but nothing happened, and if i click on my markers it shows some details.
As I described, I haven't implemented it on both.
Ok, thank you!
@wf9a5m75 Here is docs on 'Listen for click events on POIs' : https://developers.google.com/maps/documentation/ios-sdk/poi Would be nice to have click event returning placeID.
If you send as a PR, I really appreciate for your help. Otherwise, please wait when I'm ready.
I would, unfortunately I'm not into Cocoa. No hurry, just wanted to point out that google does provide such listener. Thx and keep up the good work!
I considered to implement this, but even you get the placeID, you need to obtain the information through Google Places API.
So I decided to start fundraising for creating another plugin of Google Places API. https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1888
I close this thread at once, but you can reply anytime.
Hello @wf9a5m75 , I read you are very busy ;-) and wondering what would be the advantage of this new development instead of using https://developers.google.com/places/web-service/intro which works pretty well. I'm not sure to the benefits of using the IOS api for this as it's mostly data transfer. Wouldn't your much appreciated effort be spent more wisely on things like integrating StreetView where native will probably make a big difference? Thank you!
- (void)mapView:(GMSMapView *)mapView
didTapPOIWithPlaceID:(NSString *)placeID
name:(NSString *)name
location:(CLLocationCoordinate2D)location {
NSLog(@"You tapped %@: %@, %f/%f", name, placeID, location.latitude, location.longitude);
}
Just receiving the placeId is not difficult. However you need to implement the code to get the data from Google Places API using the obtained place ID.
There are three ways: using JavaScript API, using own server, or implment http request in app. Anyway all methods are demelit.
Using JavaScript means you can not the API if the device is offline internet, and slow http request, etc.
Preparing own server is secure way, but you also need to implement the serverside sequrity, pay the server cost, etc.
Implementing Http request to Google Places API directly means you need embed your API key in JavaScript, it's very unsecure. And you can not use the API in offline.
Google provides the native API for Google Places API. I will implement it for this time. Faster than JavaScript, secure network handling, nice UIs. It has many functions. It's almost like creating another this maps plugin. It means it will be hard work easily.
I'm professional software engineer, but nobody pay for me That's why fundraising.
StreetView is another high rated request. If you pay me $1,000USD, I will implement it.