What causes this problem?
TypeError: Result of expression 'map.addLayer' [undefined] is not a function.
I am calling map.addlayer in the function after I initiated the map loading with 2 layers, then when I am trying to add another layer from a function, I got this problem.
How do you solve this issue? I tried some many options how to get var map to be global variable.
I am using jQTouch as web UI (mobile web GUI).
Any ideas how to fix this problem?
The problem is, map is not global variable.
Solution:
Window.map = new L.Map('map');
Most helpful comment
The problem is, map is not global variable.
Solution:
Window.map = new L.Map('map');