$webwork.htmlEncode($page.space.name) : Drupal
This page last changed on Jul 06, 2006 by yecarrillo.
Drupal is a content management system (CMS) that can be used to display WMS layers from GeoServer into Drupalized websites through Google Maps API .PrerequisitesDrupal set-upDownload and install Drupal from here. GMap module
More detailed instructions from the README file Creating nodes with Google MapsOnce Drupal and GMap module are configured, you can start to publish your maps by creating content (called nodes in the Drupal terminology) into your site. GMap module has two ways to insert Google Maps : GMap macro and PHP code. GMap MacroYou can include your map somewhere into the node by using this macro syntax: [gmap|id=map|center=49.2,-123.1|zoom=7|width=600px|height=400px|control=Small|type=Map] GMap module includes a macro creation tool. Point your web browser to http://example.com/map/macro . Change example.com with the address of your own website. GMap author has it made publicly avaliable his macro creation tool here: http://www.webgeer.com/map/macro. Not all the features of GMap module can be included on the macro using these tools. As of Jun 4 2006, GMap module doesn't include support for WMS layers by this method. PHP CodeCreate or edit a node(node/add/) of type page, book or story ensuring that you select PHP code as your Input Format. Use the gmap_draw_map() function. You need to prepare a parameter to this function with an array of arrays containing these values:
Use the example below as your starting point. Just copy and paste the following code into the Body textarea. ExampleThis example shows the White House using Terraserver, Lizardtech and NASA JPL WMS services (in addition to Google Map, Satellite and Hybrid maps) <?php $north = 38.897546; $east = -77.039394; $zoom = 16; $mywmss=array( array('name'=>'Terraserver', 'url'=>'http://terraservice.net/ogcmap6.ashx?', 'format'=>'image/jpeg', 'minresolution'=>'1', 'maxresolution'=>'17', 'layers'=>'DOQ', 'copyrights' => array(array( 'minzoom'=>'1', 'bounds'=>'-190,-90,180,90', 'text'=>'© terrasever', )), 'overlaywith'=>'Hybrid', 'merczoomlevel'=>'5', ), array('name'=>'Lizardtech', 'url'=>'http://wms.lizardtech.com/lizardtech/iserv/ows?service=WMS', 'format'=>'image/jpeg', 'minresolution'=>'1', 'maxresolution'=>'17', 'layers'=>'DC', 'copyrights' => array(array( 'minzoom'=>'1', 'bounds'=>'-190,-90,180,90', 'text'=>'© lizardtech', )), 'overlaywith'=>'Hybrid', 'merczoomlevel'=>'5', ), array('name'=>'NASA_JPL', 'url'=>'http://wms.jpl.nasa.gov/wms.cgi?service=WMS', 'format'=>'image/jpeg', 'minresolution'=>'1', 'maxresolution'=>'17', 'layers'=>'global_mosaic', 'copyrights' => array(array( 'minzoom'=>'1', 'bounds'=>'-190,-90,180,90', 'text'=>'© NASA', )), 'overlaywith'=>'Hybrid', 'merczoomlevel'=>'5', ), ); $mymap=array('id' => 'map', 'control' => 'Large', 'tcontrol' => 'on', 'zoom' => $zoom, 'center' => $north.','.$east, 'width' => '100%', 'height' => '500px', 'type' => 'Satellite', 'wmss' => $mywmss, ); echo gmap_draw_map($mymap); ?> External Links
drupal_terraserver_mini.png (image/png)
|
Document generated by Confluence on Jan 16, 2008 23:28 |