我已经设置了一个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
我的所有静态文件都包含在“static”目录的子文件夹中。为了更好地了解应用程序的工作原理,.swf对象访问用于渲染地图的图像文件。然后它访问rss feed以呈现注释,我在静态xml文件中创建注释并将其放在与.swf相同的目录中。 rss feed包含坐标,标题,描述和用作地图标记的图标。所有地图图块都正确显示,但没有任何注释可以显示。根据在本地重现此操作的尝试,很可能意味着.swf无法访问位于同一文件夹中的.xml文件。我不确定我能提供哪些其他信息,但可能是文件没有正确上传,或者是否有可能阻止事情的奇怪权限?它在开发服务器上运行但不是真实的东西,这是奇怪和令人沮丧的。
答案 0 :(得分:0)
以下是关于how use and read the log files for GAE的技术文章的链接 - 当我们从开发转为生产时,我们也有神秘的权限问题,通过使用详细的日志记录,我们能够解决这个问题。