[development] Substitute for the function gmap_draw_map()

Gustavo Cabral gmcabral at gmail.com
Tue Aug 3 00:28:27 UTC 2010


Hi Drupalers
I need to post in nodes distinct maps of my own (I've my server running with
mapserver), I found in the net a code to GMap module that allows me to show
my maps on contents using as a base layer map the Google Earth. The example
can be found on:
http://geoserver.org/display/GEOSDOC/Drupal

The problem is that the code uses the function gmap_draw_map(), and
searching on drupal.org I could see that the function was removed but I
can't found his substitute. Can you help me to replace that function with a
similar code?

The code is:

<?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'=>'&copy; 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'=>'&copy; 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'=>'&copy; 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);
?>

Thank you very much for advance.

Gustavo.-
-- 

Linux es Libertad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100802/e41766d9/attachment.html 


More information about the development mailing list