<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=343532114-09082006>Hi
all,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=343532114-09082006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=343532114-09082006>I'm getting close to
getting my historical photo viewer the way I want it to work. Users can
zoom into an area of interest and a photo grid will show. They can select
a custom query to view the unrectified photo in a pop up window. I am
unsure of how to make this photo zoomable. Paul had some suggestions and I
am able to make a new map file from the user's selection in the custom query
code. Here that is:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=343532114-09082006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=343532114-09082006>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 8pt"><FONT face="Courier New">if( !isset( $_GET[ 'sid'] )
)<BR><SPAN style="mso-spacerun: yes"> </SPAN>die('no session
detected');<BR><BR>// define some vars<BR>define("LOAD_MAPSESSION",
1);<BR>define( 'CHAMELEON_PATH', '/opt/chameleon/htdocs/');<BR><BR>// include
the supporting php
functions<BR>include(CHAMELEON_PATH."widgets/session.inc.php");<BR>include(CHAMELEON_PATH."widgets/query_utils.php");<BR><BR>//
execute the query based on passed coords and the mapsession<BR>$aResults =
executeQuery( $oMapSession, $_GET['x'], $_GET['y'] );<BR><BR>if
(count($aResults) > 0)<BR>{<BR><SPAN style="mso-spacerun: yes">
</SPAN>foreach( $aResults as $nLayerIdx => $aResult)<BR><SPAN
style="mso-spacerun: yes"> </SPAN>{<BR><SPAN
style="mso-spacerun: yes"> </SPAN>$oLayer =
$oMapSession->oMap->getLayer($nLayerIdx);<BR><SPAN
style="mso-spacerun: yes"> </SPAN>$szName =
$oLayer->name;<BR><SPAN
style="mso-spacerun: yes"> </SPAN>if(
$szName == 'Photo Index - 2000' )<BR><SPAN
style="mso-spacerun: yes">
</SPAN>{<BR><SPAN style="mso-tab-count: 1">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>foreach($aResult as $aRow)<BR><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-tab-count: 2"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>{<BR><SPAN
style="mso-spacerun: yes">
</SPAN>$imagenum=$aRow['TILE_ID'];<BR><SPAN
style="mso-spacerun: yes">
</SPAN>$map_path='/var/www/html/ecwrpc/map/';<BR><SPAN
style="mso-spacerun: yes">
</SPAN>$mapFileName=$imagenum . 'image.map';<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>$mapFileHandle=fopen($map_path . $mapFileName, 'w');<BR><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>$stringData="NAME
PopupImage\nSTATUS ON\nSIZE 600 450\nEXTENT 0 0 3200 3200\nUNITS
FEET\n";<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>fwrite($mapFileHandle,$stringData);<BR><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>$stringData="SHAPEPATH ../ecdata\nIMAGECOLOR 255 255 255\nIMAGETYPE
PNG\nWEB\n";<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>fwrite($mapFileHandle,$stringData);<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>$stringData="
IMAGEPATH /var/www/html/ms_tmp/\n IMAGEURL ../ms_tmp/\nEND\n";<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>fwrite($mapFileHandle,$stringData);<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>$stringData="LAYER\n
NAME \"Image\"\n STATUS Default\n DATA photos/2000/" . $imagenum .
".jpg\n";<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>fwrite($mapFileHandle,$stringData);<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>$stringData=" TYPE
RASTER\nEND\nEND\n";<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>fwrite($mapFileHandle,$stringData);<BR><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>fclose($mapFileHandle);<BR><BR><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-spacerun: yes">
</SPAN>}<BR><SPAN
style="mso-spacerun: yes">
</SPAN>}<BR><SPAN style="mso-spacerun: yes">
</SPAN>}<BR>}</FONT><BR></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 8pt"><SPAN class=343532114-09082006><FONT size=2>The map file
works fine and I can see the image but now I need to figure out how to start a
new chameleon session to enable zooming. I tried adding the original
initialization script for chameleon after the map file gets written, but I get
an error. I don't know if this is the way to go about this or
not.</FONT></SPAN></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 8pt"><SPAN class=343532114-09082006><FONT
size=2></FONT></SPAN></SPAN> </P><SPAN style="FONT-SIZE: 8pt"><SPAN
class=343532114-09082006><FONT size=2><FONT face="Courier New" size=1>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
style="FONT-SIZE: 8pt">include( "../../chameleon/chameleon.php"
);<BR><BR>$szTemplate = "./hpv.html";<BR>$szMapFile = $map_path .
$mapFileName;<BR>echo $szMapFile;<BR>class SampleApp extends
Chameleon<BR>{<BR><SPAN style="mso-spacerun: yes"> </SPAN>function
SampleApp()<BR><SPAN style="mso-spacerun: yes"> </SPAN>{<BR><SPAN
style="mso-spacerun: yes">
</SPAN>parent::Chameleon();<BR><SPAN
style="mso-spacerun: yes"> </SPAN>$this->moMapSession = new
MapSession_RW;<BR><SPAN style="mso-spacerun: yes">
</SPAN>$this->moMapSession->setTempDir( getSessionSavePath());<BR><SPAN
style="mso-spacerun: yes"> </SPAN>}<BR>}<BR>$oApp =<SPAN
style="mso-spacerun: yes"> </SPAN>new
SampleApp();<BR>$oApp->registerSkin( 'skins/sample'
);<BR>$oApp->CWCInitialize( $szTemplate, $szMapFile<SPAN
style="mso-spacerun: yes"> </SPAN>);<BR>//bug MT 615: required to get
cwcjsapi widget working<BR>$oApp->mnMinimumMaturityLevel =
MATURITY_ALPHA;<BR>$oApp->CWCExecute();<BR>?></SPAN></P></FONT>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"> </P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt">It appears the pathing ends up
wrong. <SPAN class=343532114-09082006>In t</SPAN><SPAN
class=343532114-09082006>he working page before custom query gets called the map
image properties show the link is
<EM>/localhost/chameleon//common//wrapper....</EM></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
class=343532114-09082006><EM></EM></SPAN> </P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
class=343532114-09082006>In the custom query page the image properties show the
link is <EM>/localhost/common//wrapper...</EM> and I get the error <EM>file does
not exist: /var/www/html/common/. </EM>I am not really sure how to resolve
this. I would appreciate any input as to the best way to go about
this. I'm a newbie to php programming if that matters. Hope I summed
this up so it's understandable, if I need to provide more information, just let
me know.</SPAN></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
class=343532114-09082006></SPAN> </P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
class=343532114-09082006></SPAN> </P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN
class=343532114-09082006>Thanks,<BR>Tim</SPAN></FONT></SPAN></P></SPAN></SPAN></FONT></DIV></BODY></HTML>