我已经建立了一个 AppEngine 帐户来托管一个基于 WorldKit 的地图项目http://worldkit.org/ 我已经差不多了工作,但我无法工作的最后一件事是地图注释功能,这是我希望实现的很大一部分。起初,我认为这可能是因为 WorldKit 下载附带了一些 PHP 脚本,而且我知道 GAE 不托管 PHP,但我一直在系统地从默认包中删除部分,直到我离开只有 .html、.css、.xml、.js、图像文件和一个用作主应用程序的 .swf。奇怪的是,注释可以使用本地开发服务器完美地工作,但是当我实时部署它时,地图显示正常,只是没有注释。注释是通过 GeoRSS 提要提供给应用程序的,目前我将其作为静态的只读文件提供,但我可能会看到将来对其进行实时更新。这是我的 app.yaml
application: parallelworldsmaps
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.css)
mime_type: text/css
static_files: static/\1
upload: static/(.*\.css)
- url: /(.*\.html)
mime_type: text/html
static_files: static/\1
upload: static/(.*\.html)
expiration: "1h"
- url: /(.*\.ico)
mime_type: image/x-icon
static_files: static/\1
upload: static/(.*\.ico)
expiration: "7d"
- url: /(.*\.js)
mime_type: text/javascript
static_files: static/\1
upload: static/(.*\.js)
- url: /(.*\.json)
mime_type: application/json
static_files: static/\1
upload: static/(.*\.json)
expiration: "1h"
- url: /(.*\.m4v)
mime_type: video/m4v
static_files: static/\1
upload: static/(.*\.m4v)
- url: /(.*\.mp4)
mime_type: video/mp4
static_files: static/\1
upload: static/(.*\.mp4)
- url: /(.*\.(ogg|oga))
mime_type: audio/ogg
static_files: static/\1
upload: static/(.*\.(ogg|oga))
- url: /(.*\.ogv)
mime_type: video/ogg
static_files: static/\1
upload: static/(.*\.ogv)
- url: /(.*\.otf)
mime_type: font/opentype
static_files: static/\1
upload: static/(.*\.otf)
- url: /(.*\.rss)
mime_type: application/rss+xml
static_files: static/\1
upload: static/(.*\.rss)
expiration: "1h"
- url: /(.*\.(svg|svgz))
mime_type: images/svg+xml
static_files: static/\1
upload: static/(.*\.(svg|svgz))
- url: /(.*\.swf)
mime_type: application/x-shockwave-flash
static_files: static/\1
upload: static/(.*\.swf)
- url: /(.*\.ttf)
mime_type: font/truetype
static_files: static/\1
upload: static/(.*\.ttf)
- url: /(.*\.txt)
mime_type: text/plain
static_files: static/\1
upload: static/(.*\.txt)
- url: /(.*\.webm)
mime_type: video/webm
static_files: static/\1
upload: static/(.*\.webm)
- url: /(.*\.xml)
mime_type: application/xml
static_files: static/\1
upload: static/(.*\.xml)
expiration: "1h"
# image files
- url: /(.*\.(bmp|gif|ico|jpeg|jpg|png))
static_files: static/\1
upload: static/(.*\.(bmp|gif|ico|jpeg|jpg|png))
# audio files
- url: /(.*\.(mid|midi|mp3|wav))
static_files: static/\1
upload: static/(.*\.(mid|midi|mp3|wav))
# windows files
- url: /(.*\.(doc|exe|ppt|rtf|xls))
static_files: static/\1
upload: static/(.*\.(doc|exe|ppt|rtf|xls))
# compressed files
- url: /(.*\.(bz2|gz|rar|tar|tgz|zip))
static_files: static/\1
upload: static/(.*\.(bz2|gz|rar|tar|tgz|zip))
# index files
- url: /(.+)/
static_files: static/\1/index.html
upload: static/(.+)/index.html
expiration: "15m"
- url: /(.+)
static_files: static/\1/index.html
upload: static/(.+)/index.html
expiration: "15m"
# site root
- url: /
static_files: static/index.html
upload: static/index.html
expiration: "15m"
- url: /
static_dir: static
我所有的静态文件都包含在“静态”目录的子文件夹中。为了更好地了解应用程序的工作原理,.swf 对象访问用于渲染地图的图像文件。然后它访问一个 rss 提要以呈现注释,这些注释是我在静态 xml 文件中创建的,并放置在与 .swf 相同的目录中。RSS 提要包含坐标、标题、描述和用作地图标记的图标。所有地图图块都正确显示,但没有一个注释可以正确显示。根据在本地重现此问题的尝试,这很可能意味着 .swf 无法访问位于同一文件夹中的 .xml 文件。我不确定我可以提供哪些其他信息,但可能是文件没有正确上传,或者是否有奇怪的权限阻止了事情?它'