You are here

README.txt in GMap Addons 5

This module implements various add-on overlay support for GMap.

It extends both the macro and the api interfaces.

-----------
   MACRO
-----------

Add 'overlay' sections into your macro.

[gmap |overlay=kml:http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml]
[gmap |overlay=clientsidekml:/path/to/file.kml]
[gmap |overlay=georss:http://slashgeo.org/index.rss]
[gmap |overlay=traffic:]
[gmap |overlay=tile/0.2:http://example.com:8080/geoserver/gwc/service/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}]

The part before the first : is the overlay type and overlay type options (slash delimited), which determines the behavior of the overlay.
The part after the : depends on the overlay type:

kml:
  The remainder is the url of the KML file.
clientsidekml:
  The remainder is the path to the KML file.
georss:
  The remainder is the url of the GeoRSS file.
traffic:
  The remainder is ignored. You still need to type the :, though.
tile:
  The remainder is the url scheme for requesting map tiles. {X}, {Y}, and {Z} will be replaced with the x, y, and zoom level.

Overlay type options (specified from left to right):
kml:
  None at the moment.
clientsidekml:
  None at the moment.
georss:
  None at the moment.
traffic:
  None at the moment.
tile:
  Opacity/minResolution/maxResolution
  Opacity:
    0.0 - 1.0 or 'gif'. Default is 1.0. The layer is assumed to be a PNG layer unless 'gif' is stated.
  minResolution: Minimum zoom level for this layer.
  maxResolution: Maximum zoom level for this layer.

----------------------
Notes on clientsidekml
----------------------

You will need to fetch a third party script and put it in thirdparty/.

See thirdparty/README.txt for more details.

--------------------
Notes on 'tile' type
--------------------

'tile' type works with any service which knows how to serve a tiled map using google's tiling setup.
This is similar to TMS, but has a different numbering scheme, documented at
http://code.google.com/apis/maps/documentation/overlays.html#Google_Maps_Coordinates

TileCache (http://www.tilecache.org/) and GeoWebCache (http://geowebcache.org/)
are programs capable of providing tiles in this way.

Of the two, GeoWebCache is the easiest to set up from scratch.

Interesting links for TileCache:
http://crschmidt.net/blog/311/using-tilecache-with-google-maps-and-virtual-earth/

Interesting links for GeoWebCache:
http://oegeo.wordpress.com/2008/05/20/the-5-minute-guide-to-setting-up-geoserver-and-geowebcache-on-windows/

Example urls:

GeoWebCache -- GeoServer extension:
http://example.com:8080/geoserver/gwc/service/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}

GeoWebCache -- Standalone:
http://example.com:8080/geowebcache/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}

TileCache:
http://example.com/tilecache/1.0.0/google-tiles/{Z}/{X}/{Y}.png?type=google

----------
   API
----------

$settings['overlay'] = array( // All overlays are in one numerically indexed array.
  array(
    // Overlay type, determines behavior of overlay.
    'type' => 'kml',
    // For KML and GeoRSS, the 'url' key is the URL of the file.
    'url' => 'http://mapgadgets.googlepages.com/cta.kml',
  ),
  array(
    // Overlay type, determines behavior of overlay.
    'type' => 'georss',
    // For KML and GeoRSS, the 'url' key is the URL of the file.
    'url' => 'http://slashgeo.org/index.rss',
  ),
  array(
    // Overlay type, determines behavior of overlay.
    'type' => 'traffic',
    // No options.
  ),
  array(
    // Overlay type, determines behavior of overlay.
    'type' => 'tile',
    'options' => array(
      'tileUrlTemplate' => 'http://localhost:8080/geoserver/gwc/service/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}',
      'isPng' => TRUE,
      'opacity' => 0.2,
    ),
  ),
);

-----------
   NOTES
-----------

GeoRSS and KML both use Google's GGeoXml interface, which autodetects a feed's
format, so it doesn't matter which you use.


------
 TODO
------
minZoom and maxZoom don't actually do anything -- zoom limiting is designed for *base*
layers and needs additional show/hide code to work with overlays.
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/a7aeb33781d9c573
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/555d0ccefad25ec6

File

gmap_overlays/README.txt
View source
  1. This module implements various add-on overlay support for GMap.
  2. It extends both the macro and the api interfaces.
  3. -----------
  4. MACRO
  5. -----------
  6. Add 'overlay' sections into your macro.
  7. [gmap |overlay=kml:http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml]
  8. [gmap |overlay=clientsidekml:/path/to/file.kml]
  9. [gmap |overlay=georss:http://slashgeo.org/index.rss]
  10. [gmap |overlay=traffic:]
  11. [gmap |overlay=tile/0.2:http://example.com:8080/geoserver/gwc/service/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}]
  12. The part before the first : is the overlay type and overlay type options (slash delimited), which determines the behavior of the overlay.
  13. The part after the : depends on the overlay type:
  14. kml:
  15. The remainder is the url of the KML file.
  16. clientsidekml:
  17. The remainder is the path to the KML file.
  18. georss:
  19. The remainder is the url of the GeoRSS file.
  20. traffic:
  21. The remainder is ignored. You still need to type the :, though.
  22. tile:
  23. The remainder is the url scheme for requesting map tiles. {X}, {Y}, and {Z} will be replaced with the x, y, and zoom level.
  24. Overlay type options (specified from left to right):
  25. kml:
  26. None at the moment.
  27. clientsidekml:
  28. None at the moment.
  29. georss:
  30. None at the moment.
  31. traffic:
  32. None at the moment.
  33. tile:
  34. Opacity/minResolution/maxResolution
  35. Opacity:
  36. 0.0 - 1.0 or 'gif'. Default is 1.0. The layer is assumed to be a PNG layer unless 'gif' is stated.
  37. minResolution: Minimum zoom level for this layer.
  38. maxResolution: Maximum zoom level for this layer.
  39. ----------------------
  40. Notes on clientsidekml
  41. ----------------------
  42. You will need to fetch a third party script and put it in thirdparty/.
  43. See thirdparty/README.txt for more details.
  44. --------------------
  45. Notes on 'tile' type
  46. --------------------
  47. 'tile' type works with any service which knows how to serve a tiled map using google's tiling setup.
  48. This is similar to TMS, but has a different numbering scheme, documented at
  49. http://code.google.com/apis/maps/documentation/overlays.html#Google_Maps_Coordinates
  50. TileCache (http://www.tilecache.org/) and GeoWebCache (http://geowebcache.org/)
  51. are programs capable of providing tiles in this way.
  52. Of the two, GeoWebCache is the easiest to set up from scratch.
  53. Interesting links for TileCache:
  54. http://crschmidt.net/blog/311/using-tilecache-with-google-maps-and-virtual-earth/
  55. Interesting links for GeoWebCache:
  56. http://oegeo.wordpress.com/2008/05/20/the-5-minute-guide-to-setting-up-geoserver-and-geowebcache-on-windows/
  57. Example urls:
  58. GeoWebCache -- GeoServer extension:
  59. http://example.com:8080/geoserver/gwc/service/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}
  60. GeoWebCache -- Standalone:
  61. http://example.com:8080/geowebcache/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}
  62. TileCache:
  63. http://example.com/tilecache/1.0.0/google-tiles/{Z}/{X}/{Y}.png?type=google
  64. ----------
  65. API
  66. ----------
  67. $settings['overlay'] = array( // All overlays are in one numerically indexed array.
  68. array(
  69. // Overlay type, determines behavior of overlay.
  70. 'type' => 'kml',
  71. // For KML and GeoRSS, the 'url' key is the URL of the file.
  72. 'url' => 'http://mapgadgets.googlepages.com/cta.kml',
  73. ),
  74. array(
  75. // Overlay type, determines behavior of overlay.
  76. 'type' => 'georss',
  77. // For KML and GeoRSS, the 'url' key is the URL of the file.
  78. 'url' => 'http://slashgeo.org/index.rss',
  79. ),
  80. array(
  81. // Overlay type, determines behavior of overlay.
  82. 'type' => 'traffic',
  83. // No options.
  84. ),
  85. array(
  86. // Overlay type, determines behavior of overlay.
  87. 'type' => 'tile',
  88. 'options' => array(
  89. 'tileUrlTemplate' => 'http://localhost:8080/geoserver/gwc/service/gmaps?layers=topp:states&zoom={Z}&x={X}&y={Y}',
  90. 'isPng' => TRUE,
  91. 'opacity' => 0.2,
  92. ),
  93. ),
  94. );
  95. -----------
  96. NOTES
  97. -----------
  98. GeoRSS and KML both use Google's GGeoXml interface, which autodetects a feed's
  99. format, so it doesn't matter which you use.
  100. ------
  101. TODO
  102. ------
  103. minZoom and maxZoom don't actually do anything -- zoom limiting is designed for *base*
  104. layers and needs additional show/hide code to work with overlays.
  105. http://groups.google.com/group/Google-Maps-API/browse_thread/thread/a7aeb33781d9c573
  106. http://groups.google.com/group/Google-Maps-API/browse_thread/thread/555d0ccefad25ec6