Yes,
 I use:

                var PM_request = OpenLayers.Request.GET({
                    url:'scripts/geoTiff2GeoJSON_edited.py',
                    callback:processData,
                    params:coords,
                });
                
                function processData(PM_request) {
                    var PMjson = new
OpenLayers.Format.JSON().read(PM_request.responseText);
                    console.log(PMjson);
                   } 

but, the browser throws an error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON
data
...:function(a,b){var c;if(this.nativeJSON)c=JSON.parse(a,b);else
try{if(/^[\],:{}\...


My script also writes out a json file to the file system....this file
validates correctly on an online json validator....

Would perhaps there is a way I can just deliver the json file back to the
browser...but don't know how..




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-use-best-use-python-script-with-Open-Layers-tp5154011p5154285.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to