huafu / ember-google-map

An Ember addon to include a google-map Ember friendly component in your apps.
http://huafu.github.io/#/ember?name=ember-google-map
MIT License
87 stars 34 forks source link

how to refresh the map? #33

Closed Tuhaj closed 9 years ago

Tuhaj commented 9 years ago

Is there a way provided by ember-google-map?

huafu commented 9 years ago

What do you mean by refreshing the map? You should never need to refresh it.

Tuhaj commented 9 years ago

So maybe it is a different problem... In my .hbs i have:

{{ google-map lat=lat lng=lng type=type zoom=zoom markers=markers gopt_disableDefaultUI=true }} I changed the lat and lng of the map, and the map stays at the same point. On a change like this I want to move it to a new possition.

huafu commented 9 years ago

How you change the lat and lng? Did you try to follow the example in the wiki?

Normally looking at your template you have defined lat, lng, type, zoom, markers in your controller. To move the map, you in fact want to change lat and lng property of your controller to the coordinates of the new center. So doing this.setProperties({lat: <latitude-value>, lng: <longitude-value>}); from your controller will automatically move the map, no need to do anything else.

Tuhaj commented 9 years ago

Great! Thanks to you I found the bug :)