문제

I'm storing the data like in scope of markers variable for google maps (gmaps4rails gem)

Gmaps.store = {} #handler, markers

jQuery ->
Gmaps.store.handler = Gmaps.build 'Google'
Gmaps.store.handler.buildMap { internal: {id: 'map'} }, ->
Gmaps.store.markers = ....

How do I get the markers back? Gmaps.store.markers doesn't work.

도움이 되었습니까?

해결책

Retrieve data in the callback to be sure they exist, adding a timer is very erratic.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top