mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 916 forks source link

Trying to use PlacesService #1079

Closed s-khan-net closed 8 years ago

s-khan-net commented 8 years ago

Hi, Thanks for this plugin Looking at the geocode example plugin.google.maps.Geocoder.geocode(request, function(results) { , I tried using google PlacesService like

           var request = {
                    location: center,
                    radius: 8000,
                    type: ['store']
                };
            plugin.google.maps.PlacesService.radarSearch(request, function(results) {
                alert(results.length);
            });

Should I do something in the config file or am I missing something in code? PS. I'm using PhoneGap Build

**Sorry, I had not seen the code, I guess PlacesService or AutoComplete are not implemented

Is there a possibility of getting this?**

celron commented 8 years ago

The only way you can get PlacesService to work would be to instantiate a map using google mapsjavascript libraries, not this plugin. While Google recently released native API's for places, I don't believe that it is in the scope of this project to implement them.

s-khan-net commented 8 years ago

Yes thank you But again is it possible to call the placeservice from JS and use the results on this map If so, this will increase the JavaScript API quota, wouldn't it?

celron commented 8 years ago

It is possible to call placeService from js and use the results on the plugin map. I believe the placeServices api has it's own quota separate from any map calls, but you are correct using a javascript map with the plugin map will increase the calls.

s-khan-net commented 8 years ago

Thank you I hope this plugin gets an upgrade Thanks again

braianj commented 8 years ago

Could you make it? 'cause the service is attached to the map var service = new google.maps.places.PlacesService(map);

wf9a5m75 commented 6 years ago

I decided to start fundraising for creating another plugin of Google Places API. https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1888