Giter VIP home page Giter VIP logo

Comments (14)

huafu avatar huafu commented on August 17, 2024

I didn't try yet with handlebars 2.0. Also what dd you mean by deprecated form or each? I meant where do I use a deprecated form of it?

Lemme know for the each and as soon as I have a bit of time I'll check with hb2.0. I'll try to do it in less than a week.

from ember-google-map.

lionelrudaz avatar lionelrudaz commented on August 17, 2024

About each deprecation error, I think that in your templates, instead of having this:

{{#each _markers itemView=markerViewClass}}
      <li>{{title}} @ {{lat}},{{lng}}</li>
      {{#if view.hasInfoWindow}}
        {{view 'google-map/info-window'}}
      {{/if}}
    {{/each}}

You should have this:

{{#each m in _markers itemView=markerViewClass}}
      <li>{{m.title}} @ {{m.lat}},{{m.lng}}</li>
      {{#if view.hasInfoWindow}}
        {{view 'google-map/info-window'}}
      {{/if}}
{{/each}}

More info here: http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope

I'm a newbie, so I'm not sure if this is correct.

Anyway, I don't know if the "#collection: Could not find itemViewClass" error is due to Handlebars 2.0.

Let me know if you need more information.

from ember-google-map.

huafu avatar huafu commented on August 17, 2024

Ok, you're right with the each but that's easy to fix and is not the issue here.

As I said, I've never tested my addon with Handlebars 2.0. I'll first change the each to be sure they are not using deprecated form, and then investigate on the hb 2.0 issue.

Can you gimme the full stack of the error please? Or is your project standalone and I can clone it and test it right away?

from ember-google-map.

cpttripzz avatar cpttripzz commented on August 17, 2024

I am also having a similar problem:

Uncaught Error: Assertion Failed: You specified the itemView markerViewClass, but it was not found at undefined (and it was not registered in the container)

I am unable to import the MAP_TYPES as well with this:

import {MAP_TYPES} from 'ember-google-map/components/google-map';
 Ember             : 1.7.0 vendor.js:27675
 Ember Data        : 1.0.0-beta.10 vendor.js:27675
 Handlebars        : 1.3.0 vendor.js:27675
 jQuery            : 1.11.2 vendor.js:27675
 Ember Simple Auth : 0.6.7 

application.hbs:

{{google-map lat="100" lng="100" type="road" zoom="5"}}

from ember-google-map.

huafu avatar huafu commented on August 17, 2024

@cpttripzz this is a different error, try to use a previous version of this addon, or upgrade your Ember to 1.8.1 (for the Uncaught Error: Assertion Failed: You specified the itemView markerViewClass, but it was not found at undefined (and it was not registered in the container).

For the MAP_TYPES, I have to update the readme, if you choose to update the version of Ember, then you have to import the MAP_TYPES from components/google-map relatively to your app (ie, from a controller like app/controllers/my-controller.js you'd import it with:

import { MAP_TYPES } from '../components/google-map';

Else if you choose to not update Ember and find a previous version of this component which does work, then the import might be working too.

This is due to a bug in pre 1.8.1 of Ember where the itemViewClass in each would not work as expected.

Also it looks like you don't need to import the MAP_TYPES as you do not seem to be using them in application.hbs

PS: I've allowed myself to update your comment so that it uses GFM for better reading

from ember-google-map.

davidpaulsson avatar davidpaulsson commented on August 17, 2024

I also get this issue Uncaught Error: Assertion Failed: <xxxxxxx@component:google-map::ember344> #collection: Could not find itemViewClass with

Ember: 1.9.1
Ember Data: 1.0.0-beta.14.1
Handlebars: 2.0.0
jQuery: 2.1.3

from ember-google-map.

davidpaulsson avatar davidpaulsson commented on August 17, 2024

Just confirmed that this doesn't work with the newest versions of Ember (1.9.1 and 2.0.0 of Handlebars). I cloned this repo, upgraded the project an get this error message

Uncaught Error: Assertion Failed: <dummy@component:google-map::ember259> #collection: Could not find itemViewClass 

As well as the deprecation notice discussed above.

from ember-google-map.

huafu avatar huafu commented on August 17, 2024

Ok thanks a lot, I'm going to upgrade and see what needs to be fixed

from ember-google-map.

davidpaulsson avatar davidpaulsson commented on August 17, 2024

@huafu awesome, looking forward to an update :) thank you for a great addon

from ember-google-map.

huafu avatar huafu commented on August 17, 2024

Ok, version 0.0.14 published, can you try it out?

from ember-google-map.

huafu avatar huafu commented on August 17, 2024

@davidpaulsson I fixed everything after upgrading to Ember 1.9.1 and handlebars 2.0.0, lemme know if everything works as expected ;-)

from ember-google-map.

davidpaulsson avatar davidpaulsson commented on August 17, 2024

@huafu it's working now! awesome, i think it's safe to close this issue

from ember-google-map.

huafu avatar huafu commented on August 17, 2024

Thanks!

from ember-google-map.

lionelrudaz avatar lionelrudaz commented on August 17, 2024

Thanks I will test that ASAP.

from ember-google-map.

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.