2010/8/2 Gustavo Cabral <[email protected]>
> 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'=>'© 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); > ?> > > 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
