WebGL Earth and json with jquery

Skip to first unread message

Andrew Evans

Jan 16, 2014, 4:13:37 PM1/16/14
to webgl...@googlegroups.com

First of all thank you for this wonderful project and I hope this is the appropriate place to ask questions.

I am running into an issue using jquery and json to place markers on my 3D Globe from a json file. The code I am running appears below.

        function init() {
            var options = { altitude: 6000000, position: [47.19537,8.524404], proxyHost: 'http://srtm.webglearth.com/cgi-bin/corsproxy.fcgi?url=' };
            var earth = new WebGLEarth('webgl', options);

            $.getJSON("{{=URL(r=request, f='call', args=['json','earth'])}}", function(data) {
                $(data).each(function() {
                    var project = this;
                    placemark = earth.initMarker(51.507222, -0.1275); //parseFloat(project["projects"].latitude), parseFloat(project["projects"].longitude));



It seems it is never get's to placing the placemark. I assume because of the way jquery may take over the onload event. Any advice on how I can fix this is greatly appreciated. The error I get is:

TypeError: a.a is undefined
Line 170

Thanks for any help!

Reply all
Reply to author
0 new messages