Comments (14)
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.
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.
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.
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
:
from ember-google-map.
@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.
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.
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.
Ok thanks a lot, I'm going to upgrade and see what needs to be fixed
from ember-google-map.
@huafu awesome, looking forward to an update :) thank you for a great addon
from ember-google-map.
Ok, version 0.0.14
published, can you try it out?
from ember-google-map.
@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.
@huafu it's working now! awesome, i think it's safe to close this issue
from ember-google-map.
Thanks!
from ember-google-map.
Thanks I will test that ASAP.
from ember-google-map.
Related Issues (20)
- Cannot read property 'forEach' of undefined HOT 2
- Config of apiKey
- Looking for collaborators HOT 6
- Example: Basic map with a given zoom and position / ArrayController is deprecated
- Cannot read property 'lat' of undefined HOT 2
- `GoogleObjectProperty.prototype.readGoogle` fails for `this._cfg.name === 'optimized'` HOT 2
- Something you did caused a view to re-render after it rendered but before it was inserted into the DOM. HOT 1
- is not a function on markers change HOT 2
- Can't set a description/body for a marker to be passed to the info-window HOT 2
- changing route - getting error. HOT 1
- How to display custom data in marker HOT 1
- Ember 1.13.7 custom markerInfoWindowTemplateName
- Fix suggestion for index.js (making sure map api JS loaded from http://) HOT 3
- Broken with Ember 2.0 HOT 12
- autoFitBounds broken on 0.0.22 and 0.0.23 HOT 1
- Ember.EnumerableUtils is gone in 2.0 HOT 5
- dynamically re-rendering the map component HOT 3
- Handling click event on map HOT 2
- config option for disabling in test env
- Issue zooming with property autoFitBounds=true
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 ember-google-map.