[OSM-dev] 3d Import into OpenArena working
andrzej zaborowski
balrogg at gmail.com
Sat Oct 17 22:27:44 BST 2009
2009/10/14 Nick Whitelegg <Nick.Whitelegg at solent.ac.uk>:
>>I don't think, it have to introduce a web dependency. It is just a java
> script application running inside a >browser. The script don't have to be
> on a website. It can also be a local file. The map data can also be local
>>files - maybe.
>
> That's the issue, that JS cannot normally read local files - for security
> reasons. You'd have to make at least one request to the server, as far as
> I'm aware - though the data could then be cached locally for next time.
There's a very neat trick called JSON-P ([1]) that lets you read local
files to some extent, as far as I can tell it should work with WebGL
data too. I used it in www.openstreetmap.pl/wp so that the map tiles
with wikipedia data can be read from local filesystem or even cross
site.
Cheers
1. http://en.wikipedia.org/wiki/JSON#JSONP
More information about the dev
mailing list