Comments (10)
Have you tried PlacePhoto.getUrl(PhotoOptions opts) ?
from dart-google-maps.
Yes, it does not seem to register as a method. After I have done a place details request, I have an array of PlacePhoto. When looking at their properties they don't have a method called getUrl, and trying to call it (assuming the analyzer wasn't reading the generated class structures properly) causes a exception as it is not a property.
from dart-google-maps.
Can you recreate this issue?
from dart-google-maps.
No, it works for me.
To test I added the following code to the place-details example at the line 19 of page.dart
print(place.photos
.map((p) => p.getUrl(new PhotoOptions()..maxWidth = 1000))
.join('\n'));
Dartium outputs into the console :
https://lh3.googleusercontent.com/-lZvBaeRLDII/VQKE2mBxDjI/AAAAAAAAQ_Y/PnORzvS1VykhkpKJWYxQQdVoS3NPgMHyA/w1000-k/
https://lh4.googleusercontent.com/-ic5yp2EfTqE/WBEln0fmFvI/AAAAAAAAQ-o/mMqYawGk0aIeNqFcNm57A-7NkZxuEcOyQCLIB/w1000-k/
https://lh3.googleusercontent.com/-1Fccckx6qzw/V0bhVgTB9BI/AAAAAAAABFU/wB0HwHeXewI7f-gj8Qnnbscao-jpGbSXQCLIB/w1000-k/
https://lh5.googleusercontent.com/-CJ1ZrhNl_P0/Vyb4gZO5hpI/AAAAAAAAar0/Mk0-LeVa4xQIHoYW9Cf4jZGLTHJBR7RzwCLIB/w1000-k/
https://lh6.googleusercontent.com/-IBKhgDY-GU0/Vx4irGqpF7I/AAAAAAAAPpE/ryUEVyfvWgY4oTnDSQr6ZhNwrP8NJypXQCLIB/w1000-k/
https://lh6.googleusercontent.com/-OgLBnO2n0NY/V4xq1lMja7I/AAAAAAAAS3s/0R6sv9POlzAoamPgXgazjHwzBKEDAiYEgCLIB/w1000-k/
https://lh5.googleusercontent.com/-4w1Cv-aBpw0/V995qVDNr4I/AAAAAAABjxY/nBUaHE20R_M9xWpWafU7bP9FZFwiaxEvACLIB/w1000-k/
https://lh4.googleusercontent.com/-35VJXcxLBWA/WAhgVgdh0QI/AAAAAAAAKdw/U-3vH2fvoeMJ0ihWLVJMwoZ_iRQCdh1pACLIB/w1000-k/
https://lh6.googleusercontent.com/-WMVVUCRgKfo/VyPk-kvnZDI/AAAAAAACwZU/zJn_p2_y9HUVly8ftRZqjw-F2VPuTcSygCLIB/w1000-k/
https://lh5.googleusercontent.com/-gxIsZgsWZXY/VxrdEQHoDbI/AAAAAAABh_w/3vyb__reDzEqujbMbs-Q1A_FHR46AQeKwCLIB/w1000-k/
from dart-google-maps.
I will try this and get back. Thanks!
from dart-google-maps.
So, I tried it, but it still does not recognize the getUrl function. I attached my pubspec.yaml and a screenshot of the [analyzer.]
version: 0.0.1
environment:
sdk: '>=1.19.0 <2.0.0'
dependencies:
angular2: ^2.0.0
google_maps: ">=2.0.0 <3.0.0"
google_oauth2_client:
dev_dependencies:
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
- angular2:
entry_points: web/main.dart - dart_to_js_script_rewriter
- $dart2js:
minify: true
commandLineOptions:- --show-package-warnings
- --enable-experimental-mirrors
- --trust-type-annotations
- --trust-primitives
from dart-google-maps.
Okay, I figured it out. The issue is that in order to use the version 3.1.0 of the google_maps package, you need a greater than 0.2.0 of the package js_wrapping. Currently, there is no such version, so pub degrades google_maps to 2.0.7. I will try installing a more current version.
from dart-google-maps.
Should it be js_wrapping: ^0.2.0? or should it be '>=0.2.0'....
https://pub.dartlang.org/packages/js_wrapping
right now I do not see a version that would ever allow you to use 3.1.0.
from dart-google-maps.
See the pubspec.yaml of version 3.1.0. You can take a look at #37 (comment) - that's a pubspec.yaml that works for me with angular2 and google_maps (particularly see the dependency_overrides section)
from dart-google-maps.
no dependency_overrides should be needed starting from google_maps-3.2.0
from dart-google-maps.
Related Issues (20)
- Move Camera not working HOT 7
- Remove Polyline from Map HOT 2
- Map view has Infinite Width HOT 1
- Fit bounds doesn't fit properly HOT 4
- Encoding.decodePath throws when running with webdev serve HOT 3
- How to run the demo? HOT 1
- Drawing a layer over part of the map HOT 1
- getPanorama throw a exception when consult not available location for streetview HOT 8
- Multiple Dependency Issue HOT 1
- Google Maps JavaScript API has a new loader, should this lib use it (or expose its API)? HOT 2
- Map not shown in TabBarView after upgrading from flutter version 3.3.10 to 3.7.0 or newer HOT 1
- Using legacy MapLabel JS from flutter application HOT 2
- Migrate to `package:web` HOT 11
- Error with > 7.00 version : Uncaught (in promise) TypeError: Illegal constructor HOT 1
- Finish migrating to wasm-safe JS-interop HOT 18
- Map is correctly displayed but I cannot pan, zoom or anything by default. Is this expected? HOT 1
- Using a GMap from within a material Widget tree? HOT 1
- Implement github actions? HOT 1
- [google_maps] Add AdvancedMarkerElement to resolve deprecation HOT 2
- Support to wasm HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-google-maps.