Hello,
I need a function that returns a featurecollection which is created
from a GeoJSON.
So I think that I need to do something like the following:
function getGeoJSON() {
var featurecollection;
function handler(request) {
//TODO: What to do here?
}
var request = OpenLayers.Request.GET( {
url: "http://path/to/my/GeoJSON",
callback: handler
});
return featurecollection;
}
But how exactly should the handler look like?
I have tried to add something like
featurecollection = request.responseText;
to the handler but then I get no features returned at all.
And as a second question: Should my GeoJSON generating server insert a
mime-type at the beginning of the
response or is this not needed?
Thanks a lot,
Christian
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users