![]() |
||||
|
|
||||
[maplab-users] Query Problems/ Updated MAPSIZE codeB. Tolka btolka@hsc.wvu.eduWed, 25 Sep 2002 20:30:20 -0400
|
||||
When you set a marker in the reference section of the mapfile, when you
query the whole map display turns red.
I have also updated the Map Size code, where you only need to make two
changes. Add javascript to the index.phtml
function mapsize()
{
if (document.forms[0].MapSize.selectedIndex != 0 &&
document.forms[0].MapSize.selectedIndex !=1)
document.forms[0].submit();
}
Add this section to the contents file . I have been adding this after
the BEGIN KEYMAP .
<!--------------------->
<!-- Map Size --------->
<!--------------------->
<tr>
<td align=center>
<br><br>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<b>Map Size<b><br>
<td bgcolor="#333333"><FONT FACE="Arial, Helvetica, sans-serif"
SIZE="2">
<SELECT NAME="MapSize" onChange="mapsize()">
<OPTION>Map Size</OPTION>
<OPTION>---------------</OPTION>
<OPTION VALUE="400,300"
<?php if (($oMapSession->oMap->width == 400) &&
($oMapSession->oMap->height == 300))
echo "SELECTED";?>> 400 x 300</OPTION>
<OPTION VALUE="600,450"
<?php if (($oMapSession->oMap->width == 600) &&
($oMapSession->oMap->height == 450))
echo "SELECTED";?>> 600 x 450</OPTION>
<OPTION VALUE="800,600"
<?php if (($oMapSession->oMap->width == 800) &&
($oMapSession->oMap->height == 600))
echo "SELECTED";?>> 800 x 600</OPTION>
<OPTION VALUE="1024,768"
<?php if (($oMapSession->oMap->width == 1024) &&
($oMapSession->oMap->height == 768))
echo "SELECTED";?>> 1024 x 768</OPTION>
</SELECT>
</FONT>
</td>
</tr>
</table>
</td>
</tr>
<!--------------------->
<!-End Map Size-->
<!--------------------->
<!---------------->
<!-- END KEYMAP -->
<!---------------->
</table>
Change Process map size of the main.php file to include
/*
============================================================================
* Process map size.
*
=========================================================================
*/
// set the height and width of the map
if ($HTTP_GET_VARS["MapSize"])
{
if (ereg("([0-9]+),([0-9]+)", $HTTP_GET_VARS["MapSize"],
$MapSizeExtents))
{
$WidthPixel = intval($MapSizeExtents[1]);
$HeightPixel = intval($MapSizeExtents[2]);
$oMapSession->oMap->set("width",$WidthPixel);
$oMapSession->oMap->set("height",$HeightPixel);
}
}
else
{
$oMapSession->oMap->set( "width", MAP_WIDTH );
$oMapSession->oMap->set( "height", MAP_HEIGHT );
// log event
$oMapSession->log( LOG_QUIET, "Set the map width and height to
".$nMapWidth.
", ".$nMapHeight."."
);
}
I hope this helps . I am very new to, so you all have to bear with me.
Bryan Tolka
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |