Open wjgilmore opened 8 years ago
Hello,
Thank for your issue. Some people want to know when the user change the map id. Therefore it needs to be reflected in the vue data. It needs to be sync.
On the other side some people like you don't want it to be 2 way. And this is fine. It is working but vue (and I don't know why) issue this warning. There have been multiple attempts to remove this warning but the only way we found was to disable all warnings, which is not good.
If you know a way to disable just this warning I think the community would love it.
I know this warning is not perfect but this is the same behavior for other two way attributes. (Try removing the .sync
on your map center and you will get the same warning).
Basically we had two choices:
So between a warning and a lack of feature I think a warning is still better
Regards,
Guillaume Leclerc
@GuillaumeLeclerc Of note, I believe .sync
has been removed from Vue v2. So the library will be incompatible w/ future VueJS versions w/o a change. The recommended alternatives I've seen utilize either v-model
or emit events instead.
Edit: Relevant Article
Hi,
Love the library but have been dealing with a maddening issue. When I try to set
map-type-id
I'm presented with the warningProp "mapTypeId" expects a two-way binding type. (found in component: <map>)
. This attribute is set like so:Despite the warning, the map is rendering just fine; I receive the warning, and the map renders, but does so using the
ROADMAP
type. So why in the world does this particular attribute require two-way binding, and why does attempts to set it to anything but roadmap cause the setting to be ignored? This seems to be contrary to the example presented on https://github.com/GuillaumeLeclerc/vue-google-maps in which I see the setting:map-type-id="terrain"
used in an example?Thanks so much, Jason