[development] Substitute for the function gmap_draw_map()

nan wich nan_wich at bellsouth.net
Tue Aug 3 02:26:17 UTC 2010


Post an issue in the Gmap issue queue.
 




________________________________
From: Gustavo Cabral <gmcabral at gmail.com>
To: development at drupal.org
Sent: Mon, August 2, 2010 10:09:58 PM
Subject: Re: [development] Substitute for the function gmap_draw_map()




2010/8/2 Gustavo Cabral <gmcabral at gmail.com>

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.
>I found the sustitute of gmap_draw_map(), simply replace theme('gmap', 
>array('#settings' => $mymap));
Now, when I put that code I get the next message: Javascript is required to view 
this map.
How can I solve this?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100802/bebe435d/attachment.html 


More information about the development mailing list