Hi list.
I had continued playing with Google Maps to simplify the map creation process.
I use Drupal (drupal.org) as my favorite CMS. It has a good module called gmap
(http://drupal.org/node/33591) to insert Google Maps into the content in two
ways :
- with a valid syntax processed later by the module to produce the code:
[gmap|id=locmap|center=40,0|zoom=3|width=100%|height=400px]
- embedding the code as Php. The module produces the javascript code:
$mymap=array('id' => 'map',
'control' => 'Large',
'tcontrol' => 'on',
'zoom' => $zoom,
'center' => $north.','.$east,
'width' => '100%',
'height' => '500px',
'type' => 'Satellite',
);
echo gmap_draw_map($mymap);
This is a very simple way to produce maps. You don't need to take care about
javascript...
Ok. The good news. Yesterday I commited a patch to allow include WMS layers. At
the moment just works with gmap_draw_map() function, not with the parser:
$mywmss=array(array('name'=>'BasicaIGAC',
'url'=>'http://sig.cas.gov.co:9999/geoserver/wms?',
'format'=>'image/gif',
'minResolution'=>'1',
'maxResolution'=>'17',
'layers'=>'siat:Capa Division Politica Provincias',
'copyrights' => array(array(
'minZoom'=>'1',
'bounds'=>'-190,-90,180,90',
'text'=>'©2006 SIG-CAS',
)),
'overlaywith'=>'Map',
'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);
As you can see, I were playing with the copyright objects of Gmaps API. This is
good, thus developers can add copyright messages into the maps.
For those who don't live on the Drupal world, the code produced by the module
would give you ideas to work directly with JavaScript. See this example:
http://sig.cas.gov.co/basica25/google_map
The patch is here:
http://drupal.org/node/67291
This work is in progress, but I had some issues where you can help me:
1. The module author is worried about the inclusion of wms-gs.js from
codehaus.org. Drupal admins can choose to use a local copy of this file. But if
it isn't found, the module use
http://docs.codehaus.org/download/attachments/52135/wms-gs.js instead.
Can I use it?
2. To do the transition of projections at large zoom levels, wms-gs.js do a
call to map.getZoom(). This is fine if your GMap2 object is named "map", but
gmap module has the option to create any amount of maps in a single page.
Ought! I need to figure out how to pass this object to CustomGetTileUrl
function to use it, instead of the global "map". This is a JavaScript stuff...
Thanks in advance
Eduin
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/