Kajakplatser
Dessa kajakplatser hämtas från kajakplatser.se som drivs mha Ushahidi
Closed Lunkster closed 11 years ago
could you throw together a jsfiddle so I can see exactly what your doing?
The code I use is as follows, under test and somewhat dirty of course. Sent from phone and not fiddled.
Cheers
Dessa kajakplatser hämtas från kajakplatser.se som drivs mha Ushahidi
Den 22 okt 2013 01:27 skrev "Calvin Metcalf" notifications@github.com:
could you throw together a jsfiddle so I can see exactly what your doing?
— Reply to this email directly or view it on GitHubhttps://github.com/calvinmetcalf/leaflet-ajax/issues/20#issuecomment-26765855 .
Oh... sorry for the total lack of formatting... Den 22 okt 2013 01:27 skrev "Calvin Metcalf" notifications@github.com:
could you throw together a jsfiddle so I can see exactly what your doing?
— Reply to this email directly or view it on GitHubhttps://github.com/calvinmetcalf/leaflet-ajax/issues/20#issuecomment-26765855 .
XMLHttpRequest cannot load http://kajakplatser.se/json. Origin http://calvinmetcalf.github.io is not allowed by Access-Control-Allow-Origin.
http://kajakplatser.se/json doesn't have cors turned on
as of 01d15576344dd391b8aba2222d7dd7f0ac76ae0d it now gives better errors for cross origin issues
Thanks for the info. It seems that the jsonp-url should be as follows: http://kajakplatser.se/api?task=incidents&resp=jsonp&callback=callback
When I try that I don't get any error messages, but no incidents show up. Any ideas? Cheers Henrik
the data at that endpoint isn't actually geojson, you can use the jsonp function to download and then manually add it to the map if you want
L.Util.jsonp('http://kajakplatser.se/api?task=incidents&resp=jsonp').then(function(data){
//do stuff
});
ah... thanks for your time. :-)
this isn't open layers
On Mon, Jul 21, 2014 at 4:50 AM, neogeomat notifications@github.com wrote:
How can i do the jsonp request with OpenLayers? i tried roadreport = OpenLayers.Request.GET({url:" http://kathmandulivinglabs/roadreporter/api/?task=incidents&resp=jsonp&callback=callback "}) and it gives net::ERR_NAME_NOT_RESOLVED error.
— Reply to this email directly or view it on GitHub https://github.com/calvinmetcalf/leaflet-ajax/issues/20#issuecomment-49583275 .
-Calvin W. Metcalf
you might try http://gis.stackexchage.com
On Mon, Jul 21, 2014 at 5:17 AM, Calvin Metcalf calvin.metcalf@gmail.com wrote:
this isn't open layers
On Mon, Jul 21, 2014 at 4:50 AM, neogeomat notifications@github.com wrote:
How can i do the jsonp request with OpenLayers? i tried roadreport = OpenLayers.Request.GET({url:" http://kathmandulivinglabs/roadreporter/api/?task=incidents&resp=jsonp&callback=callback "}) and it gives net::ERR_NAME_NOT_RESOLVED error.
— Reply to this email directly or view it on GitHub https://github.com/calvinmetcalf/leaflet-ajax/issues/20#issuecomment-49583275 .
-Calvin W. Metcalf
-Calvin W. Metcalf
Hi all I try to consume locations from a Ushahidi website which deliver a kind of "dirty" json but it passas as valid in online json validators.
I get an error at leaflet.ajax.js, row 547: SyntaxError JSON parse: unexpected end of data.
http://kajakplatser.se/json
Is there a solution for this or is Ushahidi v2.7 json inedible? :-)
Cheers Henrik