draw in a map
Ruslan Nuryadin
nuryadin at GMAIL.COM
Tue Jun 21 23:30:11 PDT 2005
Mehdi,
You can use Chameleon framework
(http://chameleon.maptools.org/index.phtml) for your needs. It's based
on PHP classes and a HTML template file containing the 'widget set'.
Here's an example of Chameleon application file:
<?php
include( "/opt/chameleon/htdocs/chameleon.php" );
$szTemplate = "./template03.html";
$szMapFile = "../map/Indonesia02.map";
class Indonesia03 extends Chameleon
{
function Indonesia03()
{
parent::Chameleon();
$this->moMapSession = new MapSession_RW;
$this->moMapSession->setTempDir( getSessionSavePath());
}
}
$oApp = new Indonesia03();
$oApp->registerSkin( 'skins/sample' );
$oApp->CWCInitialize( $szTemplate, $szMapFile );
$oApp->CWCExecute();
?>
And here's a snapshot of the template file (too long to fit whole file
here):
<cwc2 type="ZoomIn"
visible="true"
imagewidth="24"
imageheight="24"
imagetip="Zoom In"
toolset="Navigation"
default="true">
<image state="normal" image="buttons/button_zoomin_1.png"/>
<image state="hover" image="buttons/button_zoomin_2.png"/>
<image state="selected" image="buttons/button_zoomin_3.png"/>
</cwc2>
--
ruslan
Mehdi Kiman wrote:
> hello,
>
> I would to draw objects in my map and make some calculations :
> - draw a zooming box, a point, a polygon, a line
> - make distance and surface measuring
>
> I know that's possible with jbox and rosa applets but i must only use
> javascript.
>
> I have 2 questions :
> is it possible to do all these operations with phpMapscript and
> javaScript ?
> can you give me some code examples ?
>
> Thanks
>
> Mehdi
> France
>
More information about the MapServer-users
mailing list