This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to use (from an URL) a Shapefile in Potlatch to avoid the error “The file could not be loaded”?

1

In an answer to What is the easiest way to import polygons from the Corine Land Cover? I was suggested to use an shapefile in Potlatch. So I tried with that:

In Potlatch I choosed "Background" and then "Vector file..." and picked "shapefile" and write the URL to my *.shp file. But when I pressed "Load" I got an error "The file could not be loaded" like on this screenshot:

alt text

How can I use a shape file in Potlatch?

asked 13 Oct '11, 09:51

Jonas_'s gravatar image

Jonas_
662152233
accept rate: 0%

edited 17 Jun '13, 00:47

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

sorry for hijacking this thread... can I also use a shapefile I have locally stored on my harddrive in Podlatch? Without the detour through a file hoster, I mean...

(21 Oct '11, 16:11) moszkva ter
1

No, not yet. We have only just moved to Flash Player 10 which is the first version to allow this, and haven't had chance to code that yet.

(21 Oct '11, 20:56) Richard ♦
1

(Update: you can now use locally stored shapefiles; they need to be compressed in a .zip file before you load them.)

(17 Jun '13, 11:02) Richard ♦

One Answer:

4

Flash Player will refuse to open files from a remote server (i.e. a domain other than the one where the Flash app is hosted) unless that server gives permission.

To give permission, you need to put a crossdomain.xml file at the root level of your webserver that says "allow any Flash app to load stuff from this webserver".

The easiest way to do this is to copy one that already works, such as Flickr's! So grab the file from http://api.flickr.com/crossdomain.xml and upload it to yourdomain.com/crossdomain.xml.

answered 20 Oct '11, 23:11

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

Source code available on GitHub .