[Chameleon] KeyMap question
Sears, Jeremy
Jeremy.Sears at CCRS.NRCan.gc.ca
Fri Jan 27 16:55:58 EST 2006
hmmm,
So am I correct to assume then that coaxing chameleon to produce an image on
disk that contains my keymap + extent rectangle would involve more than
simply modifying a line or two of code?
What's the DOM?
Thanks
Jeremy
-----Original Message-----
From: Paul Spencer [mailto:pspencer at dmsolutions.ca]
Sent: January 27, 2006 4:49 PM
To: Sears, Jeremy
Cc: 'chameleon at lists.maptools.org'
Subject: Re: [Chameleon] KeyMap question
OOOHHHHHH ... you are using KeyMapDHTML!!! It just takes a copy of
the reference map and uses the DOM to create the red extents, so the
traditional reference map stuff is never used. The image is never
changed.
Cheers
Paul
On 27-Jan-06, at 3:58 PM, Sears, Jeremy wrote:
> Hi Paul,
> Thanks for you continued attention.
>
>>> Is it possible that this never gets executed and the thread of
>>> execution goes elsewhere?
>
> As far as I can tell, This may be the case. When I remove
> 'drawmap.php'
> entirely and fire up my app, the keymap still draws, however my
> main map
> does not. Furthermore, the keymap is still 'functional' in this
> situation,
> in that I can define a extent box to which the main map would zoom, if
> 'drawmap.php' were present.
>
> Also, I have tinkered with the following widgets by inserting a line
> simmilar to:
> $_SESSION['testvar']= "setfromkeymapDHTML";
> those widgets are : Keymap, KeymapDHTML, and KeyMapDHTMLmode
> $_SESSION['testvar'] only get assigned a value from 'keymapDHTML' and
> 'KeymapDHTMLmode', not from 'keymap', nor does $_SESSION['testvar']
> get
> assigned when inserted in various places in 'drawmap.php'.
>
>
>>> Also, is the image being saved in some
>>> other location entirely?
>
> As far as I can tell, no. However Its possible I just cant find it.
> The
> source of my keymap image is a small gif of the entire extent of my
> geographic area of interest. It is defined in the map file as follows:
>
> ######################################################################
> ###
> # Reference map
> #
> REFERENCE
> IMAGE images/keymap.gif
> EXTENT -2594561 -712631 3467361 3840000
> STATUS ON
> COLOR -1 -1 -1
> OUTLINECOLOR 255 0 0
> SIZE 120 90
> END
>
> Does Chameleon happen to save temp images somewhere in its own
> folders? Ive
> looked around but cannot find an image resembling the keymap?
>
> Can you recommend any further 'tests' or changes to the code I
> could make
> that would shed more light on what's going on with my keymap? I'm
> beggining
> to think that Chameleon is only drawing an extent rectangle over-
> top of my
> keymap rather that generating the keymap and extent rectangle as
> one image.
> Is this a possibility?
>
> Thanks
> Jeremy
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Paul Spencer [mailto:pspencer at dmsolutions.ca]
> Sent: January 27, 2006 3:24 PM
> To: Sears, Jeremy
> Cc: 'chameleon at lists.maptools.org'
> Subject: Re: [Chameleon] KeyMap question
>
>
> Is it possible that this never gets executed and the thread of
> execution goes elsewhere? Also, is the image being saved in some
> other location entirely? Chameleon may be changing the imagepath
> from the mapfile setting and you wouldn't know it.
>
> Cheers
>
> Paul
>
> On 27-Jan-06, at 1:45 PM, Sears, Jeremy wrote:
>
>> Hi Paul,
>> I am picking over 'drawmap.php'. There is a function defined in
>> drawmap.php
>> that is also called in drawmap.php named 'DrawKeyMap()'. Near the
>> end of the
>> function are the following lines:
>>
>> /*
>> --------------------------------------------------------------------
>> *
>> /
>> /* draw the image and output
>> it. */
>> /*
>> --------------------------------------------------------------------
>> *
>> /
>> // $imgObj = $oMapSession->oMap->drawReferenceMap();
>>
>> // $szWebImage = $imgObj->saveWebImage();
>>
>> ...(lines 1408 thru 1413)...
>>
>> You have to excuse me but Im in the process of learning php. It
>> appears to
>> me that by uncommenting the two lines there, the keymap should be
>> created
>> ($imgObj) and the location of the keymap should be then stored in
>> ($szWebImage).
>>
>> I have uncommented the two lines however I dont see the keymap
>> image in my
>> tmp folder. Also, it would seem that nothing gets written to the
>> $szwebImage
>> variable.
>>
>> Have I overlooked other parts of drawmap.php that are relavent to
>> my task?
>> Why does uncommenting the two above mentioned lines of code
>> seemingly have
>> no effect?
>>
>> Thanks
>> Jeremy
>>
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Paul Spencer [mailto:pspencer at dmsolutions.ca]
>> Sent: January 27, 2006 12:16 PM
>> To: Sears, Jeremy
>> Cc: 'chameleon at lists.maptools.org'
>> Subject: Re: [Chameleon] KeyMap question
>>
>>
>> Jeremy, the image is returned from drawmap.php. You can modify
>> drawmap.php to save the image as well as/instead of just returning
>> it.
>>
>> Cheers
>>
>> Paul
>>
>> On 27-Jan-06, at 12:03 PM, Sears, Jeremy wrote:
>>
>>> Good Day All,
>>> Im wondering how one would go about coaxing chameleon to produce a
>>> keymap
>>> image on disk. I've been looking around in the KeyMap, KeymapDHTML
>>> and
>>> KeymapDHTMLmode widgets for a means to do this but nothing is
>>> jumping out at
>>> me.
>>>
>>> Ideally, an image of my keymap would be produced the same manner
>>> that the
>>> image of my scalebar is produced.
>>>
>>> It looks to me that the keymap widgets create the image on the fly
>>> via calls
>>> to mapserver, and don't actually store the image.
>>>
>>> Can anyone offer general or specific steps I should consider to
>>> accomplish
>>> this?
>>>
>>> Thanks
>>> Jeremy
>>>
>>> _______________________________________________
>>> Chameleon mailing list
>>> Chameleon at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/chameleon
>>>
>>
>> +-----------------------------------------------------------------+
>> |Paul Spencer pspencer at dmsolutions.ca |
>> +-----------------------------------------------------------------+
>> |Applications & Software Development |
>> |DM Solutions Group Inc http://www.dmsolutions.ca/|
>> +-----------------------------------------------------------------+
>>
>>
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>
> +-----------------------------------------------------------------+
> |Paul Spencer pspencer at dmsolutions.ca |
> +-----------------------------------------------------------------+
> |Applications & Software Development |
> |DM Solutions Group Inc http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
>
>
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the Chameleon
mailing list