arunisrael / angularjs-google-places Goto Github PK
View Code? Open in Web Editor NEWAn angular.js wrapper around the Google Places API
License: MIT License
An angular.js wrapper around the Google Places API
License: MIT License
If you do something like:
_dashboard.getGuideLocationDetails = function(guideLocations){ var promises = []; var locationDetails = []; angular.forEach(guideLocations, function(location){ if(location.placesRef){ promises.push(ngGPlacesAPI.placeDetails({reference:location.placesRef}).then(function(l){ locationDetails.push(l); })); } }); return $q.all(promises).then(function(){ return locationDetails; }); }
Where you are handling more then 10 refs, it just doesn't resolve.
parseNSJSON should read nearbySearchKeys from this.nearbySearchKeys instead of detauls.nearbySearchKeys and the same should probably happen for parsePDJSON
According to Google's documentation, the array photos
in the results contains the attributes height
, width
, html_attributions
, and photo_reference
. See here: https://developers.google.com/places/web-service/search#PlaceSearchResponses
But with angularjs-google-places there is only height
, width
and getUrl()
. When I call getUrl()
something breaks in Places API's javascript and I get this error:
TypeError: Cannot read property 'maxWidth' of undefined
at AN (http://maps.google.com/maps-api-v3/api/js/23/3/intl/pt_br/util.js:212:133)
If I could get photo_reference
I could build the URL by myself, but it's not present as I just said.
Is there an workaround?
Hello,
It'd be great if we could get the optional keyword parameter. I didn't see it specified in your defaults. I tried using it before looking at your code and it gave me no results.
Cheers
I don't know whether it's possible or not but If someone is able to set default values for types:[] dynamically then it would be great.
The nearbySearchKeys
and placeDetailKeys
filter the default values that Google returns, requiring that the user go through lengthy app.config(function(ngGPlacesAPIProvider) { ngGPlaces....
boilerplate before being able to access the elements they need -- like the geometry
key that contains each place's GPS! Why are you filtering those? There's no gain since they are already being returned by Google.
Anyhow, thanks for the library.
The library fails to automatically integrate with a grunt build process. The "main" path provided in bower.json and .bower.json points to "google-places.js" instead of "src/angularjs-google-places.js".
I can see the right path in the repository, but when I bower install an version 0.1.0 gets installed with the old paths in "main". Did you register the update with bower?
Could you please correct the path?
Thanks
Hi,
keywords, query has no effect on results. No spaces, single keyword.
Ideas?
Due to angularjs-google-places requiring "google" be defined at time of load. It will throw an error at line 4.
The places documentation mentioned you can get a next_page_token to point to the next 20 results. I'm just wondering how I can do this to get all the search results.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.