Giter Site home page Giter Site logo

Comments (10)

a14n avatar a14n commented on August 21, 2024

Have you tried PlacePhoto.getUrl(PhotoOptions opts) ?

from dart-google-maps.

Andruj avatar Andruj commented on August 21, 2024

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.

Andruj avatar Andruj commented on August 21, 2024

Can you recreate this issue?

from dart-google-maps.

a14n avatar a14n commented on August 21, 2024

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.

Andruj avatar Andruj commented on August 21, 2024

I will try this and get back. Thanks!

from dart-google-maps.

Andruj avatar Andruj commented on August 21, 2024

So, I tried it, but it still does not recognize the getUrl function. I attached my pubspec.yaml and a screenshot of the [analyzer.]

screen shot 2016-11-02 at 12 49 27 pm

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.

Andruj avatar Andruj commented on August 21, 2024

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.

Andruj avatar Andruj commented on August 21, 2024

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.

a14n avatar a14n commented on August 21, 2024

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.

a14n avatar a14n commented on August 21, 2024

no dependency_overrides should be needed starting from google_maps-3.2.0

from dart-google-maps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.