[OpenLayers-Users] Problems embedding OpenLayers in a Blog

Marc Jansen jansen at terrestris.de
Wed Dec 23 10:29:20 EST 2009


Hi Mike,

as for OpenLayers, it shouldn't be a problem to get it hosted nearly 
everywhere since it is only JavaScript. Obviously you cannot use any 
datasource, though. Maybe you can set up a proxy that handles the 
requests, but I'd doubt that it is possible for your current 
*.blogspot.com-adress.

Regards,
Marc



jamesmikedupont at googlemail.com wrote:
> Thanks for your advice. That is interesting.
> I never did anything like this, and I feed pretty stupid right now!
>
> But it will be possible to host the webpages on archive.org as well
> and work without the blog itself. It just would be nice to separate
> the display and the data storage. That effectively reduces the usage
> of openlayers to people who have control of domains, right? It will
> not be possible to people to just create maps with any data they want
> without a server to proxy the data.
>
> Now, this example, it displays an openstreetmap map
> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html
>
> but the fetch to :
> http://www.openstreetmap.org/api/0.6/way/24315294/full
> that fails, or never returns.
>
> But the same one to use open layer to load the data from osm fails :
> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html
>
> It calles get on this url http://www.openstreetmap.org/api/0.6/way/24315294
> in the request	XMLHttpRequest.js (line 200)
>
> the other thing is that I dont get any error message about security problems
>
> I found this document here:
> http://docs.openlayers.org/library/request.html
>
> So, realistically it is not possible to host open layers on a blog?
>
>
> mike
>
> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen <jansen at terrestris.de> wrote:
>   
>> Hi Mike,
>>
>> I am pretty sure that you aren't allowed to acces datasources via XHR/AJAX
>> from other servers than the one the original page is served from.
>>
>> see: http://en.wikipedia.org/wiki/Same_origin_policy
>>
>> Just a quick guess, though.
>>
>> regards,
>> Marc
>>
>>
>> jamesmikedupont at googlemail.com wrote:
>>     
>>> Hi there,
>>> I have attempted to embed openlayers in a blog post,
>>> and am failing! Any help would be appreciated.
>>>
>>> using osm data hosted OSM data on archive.org
>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html
>>>
>>> here is get a octet bytestream because archive org does not say the
>>> right filetype.
>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this
>>> returns a 206 partial content and fails.
>>>
>>> in a pastebin file that is delivered as text:
>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html
>>> Date    Wed, 23 Dec 2009 10:15:43 GMT
>>> Server  Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4
>>> PHP/4.3.10-22 mod_perl/1.29
>>> X-Powered-By    PHP/4.3.10-22
>>> Content-Disposition     attachment; filename="f28514ba0.txt"
>>> Keep-Alive      timeout=15, max=100
>>> Connection      Keep-Alive
>>> Transfer-Encoding       chunked
>>> Content-Type    text/plain; charset=iso-8859-1
>>>
>>> So the problem might be the attachment...
>>>
>>> and that data from osm directly again on pastebin,
>>>
>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html
>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a
>>> 200 ok.
>>> It returns an : text/plain; charset=iso-8859-1 but does not render.
>>> But there is still nothing there
>>>
>>> from osm directly
>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html
>>> firebug says :no element found
>>>
>>> And my last try was to put the code from osm on the page directly,
>>> also not rendering but the xml is loading.
>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html
>>>
>>> but nothing is working
>>>
>>> would appreciate any tips and help
>>> thanks
>>> mike
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>       




More information about the Users mailing list