Gallery:模块:地图(Map)

来自站长百科
Firebrance讨论 | 贡献2008年10月13日 (一) 15:24的版本 (取消由Firebrance (对话)所作出的修订 12725)
跳转至: 导航、​ 搜索
此页提供Google地图与Gallery整合的相关信息。


进度跟进,Bug发布,特点请求以及捐赠Sourceforge项目页面
有关该模块的疑难解答请见:第三方模块和外观主题的支持
模块用户指导在此


历史: 此最初为HorsePunchKid所创建的模块

开始都是由LarryDoliver所创建的外观主题,稍后转为了模块。现在其具有诸多特点并且还有更多特点值得期待:-), 这都要归功于 Termite以及后文列出的开发者和测试者。

当前版本
Gallery 2.0.x => 0.4.11d
Gallery 2.1.x & 2.2.x => 0.5.6
最近一次上传:2007-12-27
参看Changelog
以及
我们的工作进度


安装

举例

截屏

在线实时地图

下载

  • Google地图模块图标:下载
  • 你也可通过SVN下载最新的修订版模块
  • 浏览最新的源代码:gmap-module

通过SVN下载

在Windows客户端上安装一个SVN客户端。我使用的是: http://tortoisesvn.net/downloads

接着添加: https://gmap-module.svn.sourceforge.net/svnroot/gmap-module/Gallery2.1/modules/map 这是存储库的URL地址。

浏览SVN中的修改:http://gmap-module.svn.sourceforge.net/viewvc/gmap-module/Gallery2.1/modules/?sortby=date

重要

  • 你无需同时具有模块和外观主题,参见 后文来看看两者到底有何不同
  • 该模块有两个版本分别对应gallery2.0及较低版本和gallery2.1及较高版本,它们是不可交互兼容的。

要求

对于二者

  • Gallery 2 – 带有一些相册和相片,否则的话它不会太有用处:)
  • 此为需要的Google API Key

仅对模块而言

  • ImageMagick(你可以不用它但少享受一些特点)
  • Gallery EXIF- 1.0.1及更高版本模块也可与1.0.0兼容,只需做很少的修改

仅对外观主题而言

  • 自定义字段(Custom Fields)模块在

指导

有关外观主题更详尽的指导请见:Gallery:Themes:Map

有关模块更详尽的指导请见:Gallery:Modules:Map:UserGuide(开发中)

模块与外观主题之间的不同之处

Note:
The current module being tested for the release of gallery2.1 will have most of the theme features in it making the theme somewhat obsolete

文件:MapTheme.jpg
Map theme Picture
The Theme is album based
  • Basically when the theme is installed you can apply the theme to an album
  • The Theme is based on the original Matrix theme
  • This album would then display all pictures and album with GPS coordinate contained in the album on a Google Map using the API.
  • It uses an API key that needs to be entered per album (it can be the same one if you make the API key for your domain)
  • Each album with this theme looks pretty much like this =>
  • There are some settings that can be changed and made specific to each album with the theme
  • You need the Custom Fields module installed to enter the co-ordinates


The Module works in a different way and has way more features.
  • It has global parameters and all albums and photos from the entire gallery with GPS coordinate are being displayed on one single Google Map (for the time being)
  • There are many people working on this module, look for updates on the forum or on this wiki
  • Among the main features is the ability to gather GPS coordinate from addresses, EXIF infos and "point/click"
  • Also ability to create you own marker set and routes to join markers
  • There is a good feature set with this module that never stops increasing :-) See BELOW for the current feature set.
  • If you want to see the module screenshots, they can be found HERE
  • Detailed and always updating feature list is below








模块目前的特点集

各相册/相片的特殊地图设定,这将会以弹出方式显示在Google地图上,并且带有缩略图和链接

  • 按以下所列输入数据
    • 手动地在google地图上
      • 自各点
      • 和某地址输入
      • GPS坐标


  • 模块重写支持(创建规则使/map/指向地图)


  • 调整地图尺寸(%或像素),默认缩放级别,地图中心点
    • 放大机缩小链接的缩放级别(Zoomlevel)
    • 自动化Center&Zoom


  • 可新建或上传Marker或MarkerSet
    • basemarker的选择
    • 尺寸的选择Choice of size
    • 颜色的选择(所有或一些)
    • 相册和图标的不同marker集。


  • GxMagnifier
    • 在地图上能有2个放大镜
    • (通过放大镜图标)进行常规缩放(Zoom)
    • 显示一不同的缩放(如negative zoom)
    • GxMagnifier对点击有反应


  • 修改缩放控制(Zoom Control)
    • 内置外观主题
    • 可创建自己的


  • 线路(链接相册/相片的polyline)
    • 能够在某路线中重复使用某项目
    • 某路线的marker部分按照所选定的排序进行编号


  • 显示地图某特定区域的过滤器
    • 可指向某路线的过滤器
    • 可显示仅为与相册和子相册中项目的过滤器


  • 模块页面上显示的legend
    • 通过点击图例显示/隐藏地图上特定颜色的标记
    • 图例可为边栏上的一个区块


  • 可以创建"Google Map Group"
    • 一个组(group)就是一个marker(缩略图,GPS坐标,放大等级,颜色,描述等等)
    • 一个组可以含有相片,相册和小组
    • 当点击一个组时,仅在地图上显示属于该组的部分
    • 组可以使用自己的MarkerSet


  • 自外观主题(gallery2.1版本)添加缩略图条
    • 可被定位在地图周围
    • 根据需要字段添加滚动条
    • 点击1个项目会定向到该项目并打开其窗口
    • 鼠标悬停效果


  • 向Google Earth导出数据
    • 能够启用/禁用"导出至GE"


  • 信息窗(Infowindows)
    • 自定义外观
    • 与缩略图一起插入自定义链接和元数据


  • 多语言支持
  • Google地图key管理(Google Map Key Management)特点(根据站点访问方式的不同有多种key)
  • 自动由EXIF头填入GRP坐标
  • 显示浏览历史并允许"还原"

变通方法

  • 点击某项目不显示infowindow':在Map地图当前的两个版本中,由于Google 地图API的某些改动导致GxMagnifier扩展不再可用,因为这些改动阻止Infowindw的打开。

变通方法: 禁用GxMagnifier扩展。首先确保在general标签中已启用了GxMagnifier特点,接着打开GxMagnifier标签并在此禁用该特点。完成之后,你可在general标签上禁用"该特点",这将会移除该标签。该模块的下个版本会包含进GZoom,也就不会有这种问题了 :-)

  • 与PG外观主题并用的模块: Map模块的0.4.8d版本包含模块方所需做的修改。而外观主题也需要进行修改:

Theme.js中找到该行(靠近文件尾)

var browser = new Browser();

将其改为

if (undefined === window.GoogleMap) {var browser = new Browser();}
  • IE中的route 当启用某route,IE会显示JavaScript错误。

你需要编辑theme.tpl(我建议创建一个"local"文件夹并将你修改好的tpl文件放在其中

在新文件中,你需要将<html>标记改为如下的样子:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">

自0.4.10版本开始,可以通过一个按钮进行此修改。

Gallery2:Map模块团队

开发者

原班人马:
后继有人:
  • Termite:领头羊
  • Floridave:殚精竭虑中。
  • Jelwell
  • jcampbell1:更多问题的修复就靠这位了。
  • Ninjainvasion:正尽力完善此模块。
  • SiliconFiend:"向Google Earth导出"特点的重写,迷你地图区块,bug修复以及其他改良
  • 很多其他开发者的wiki名称尚不知晓…如悉的话请在此更新上来

测试者

  • Igrcic:测试无止境:)
    1. g2使用PostgreSQL db安装在linux slackware box上的。
    2. 现在使用带有MySql的Win2k,IIS/5 :(

Testing it on 在WinXP和slack上使用最新的Mozilla和Firefox浏览器对其进行了测试。

  • Swordfish 嵌入WPG2中的测试。使用Apache1, PHP-4.4.0, mod_gzip, MySQL 4.0.25在Gentoo linux 上安装G2/WordPress。在3台独立的WinXP 机器上使用IE6和火狐浏览器进行测试。
  • Jeff Billimek:早期作出了一些贡献,目前正进行模块的测试。
  • Galmoid
  • dotnature:尝试更新wiki,图标并且在joomla中进行测试。
  • caddymob:早期测试者,很快地添加了大量geotagged相片...
  • christ:由Gallery 2.1入伙:正广泛地使用它
  • 很多其他测试者的wiki名称尚不知晓…如悉的话请在此更新上来

测试于

服务器端
Linux Server(fedora core 3和4)
Windows XP SP2
SunOS u30 5.9
Debian Sarge, Ubuntu 5.10
SME Server 7.x(基于Centos 4)
Apache 1.3.33,PHP 4.3.10, MySql 4.1.9
Apache 2.0,PHP 5.0,Mysql 4.1.9
Apache 2.0.49 PHP 4.3.4 Mysql 4.0.18
Apache 2.0.53,PHP 4.3.11,Mysql 4.1.12
Apache 1.3.33,PHP 4.3.10,Zend 1.3.0,Mysql 4.1.11

客户端
Windows XP SP2上的Internet explorer 6.0 SP2
Windows XP SP2上的Internet explorer 7.0
Windows XP上的Deer Park Alpha 2
Windows Vista Home Premium 上的Firefox 2.0.0.6
Windows XP上的Firefox 1.5 beta 2
Windows XP SP2上的Firefox 1.5.0.1(最终版)
Fedora Core 3上的Firefox 1.0.7
MAC OS X 10.4.2上的Safari
MAC OS X 10.4.4, 10.4.5和10.4.6上的Safari 2,Camino 1.0以及Firefox 1.5.0.1