Hi Paul,<br>
<br>
I apologize for taking so long to get back to you.&nbsp; I was waiting
to hear whether we could afford (time-wise) to make this a priority for
the project at this point.&nbsp; Unfortunately, we are up against some
deadlines and I won't be able to get to this for a while.&nbsp;
However, it is definitely a worthwhile endeavor and I hope to get back
to it eventually.&nbsp; I will let you know when I do.&nbsp; Thanks
much for the help!<br>
<br>
Jennifer Zeisloft<br>
UW Sea Grant<br><br><div><span class="gmail_quote">On 8/30/05, <b class="gmail_sendername">Paul Spencer</b> &lt;<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jennifer,<br><br>you can't do this with stock MapServer as the mapfile structure will not<br>permit it.<br><br>With some mapscript intervention, you can replace the image in the<br>reference object.&nbsp;&nbsp;I would probably approach it differently in
<br>Chameleon, but a simple solution would be to have metadata at the map<br>object that contains sufficient information to replace the reference map<br>image.<br><br>I think you will need to know the following:<br><br>1. image
<br>2. extents of the image<br>3. extents/scale to start using the image<br><br>One of the problems that I percieve with this approach is that the<br>purpose of having a second keymap would be to provide more detail when<br>
you zoom in.&nbsp;&nbsp;If you have one (or possibly many) pregenerated images<br>then it will be possible for the user to zoom to an area that doesn't<br>make sense for the keymap you have generated.<br><br>You could make it extent-sensitive and divide up the 'zoomed in' keymaps :
<br><br>+----+----+<br>|&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;|<br>+----+----+<br>|&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;|<br>+----+----+<br><br>but then it would be possible to zoom in at the center of this and get<br>poor results.<br><br>An alternate approach would be to use a second map file to define how to
<br>draw a keymap image and have it render keymap images on the fly<br>depending on scale.&nbsp;&nbsp;This would be my preferred approach.&nbsp;&nbsp;You would set<br>scale thresholds for producing new keymaps and when they change, they<br>would always start at the center of where the user is currently viewing.
<br><br>In Chameleon, I would add this as attributes of the keymap widgets to<br>abstract it away from the mapfile structure, perhaps using subtags:<br><br>&lt;cwc2 type=&quot;KeymapDHTML&quot; ... &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;ReferenceMap mapfile=&quot;
path.to.mapfile&quot; maxscale=&quot;100000000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;ReferenceMap mapfile=&quot;path.to.mapfile&quot; maxscale=&quot;10000000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;ReferenceMap mapfile=&quot;path.to.mapfile&quot; maxscale=&quot;1000000&quot;/&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;ReferenceMap mapfile=&quot;path.to.mapfile&quot; maxscale=&quot;100000&quot;/&gt;<br>&lt;/cwc2&gt;<br><br>The widget would then have to track scale changes as the user zooms and<br>pans, refreshing the keymap image each time the user moves outside the
<br>current extents of the keymap or changes scale across a threshold.<br><br>If you decide to attempt this, lemme know and I may have some time to<br>help out as I think this would be a great improvement.<br><br>Cheers<br>
<br>Paul<br><br>Jennifer Zeisloft wrote:<br>&gt; Hello All-<br>&gt;<br>&gt; I am playing with including two keymaps in my application (one that is<br>&gt; more useful when zoomed in, and one when zoomed out).&nbsp;&nbsp;They would be
<br>&gt; displayed simultaneously.&nbsp;&nbsp;I am having some trouble doing this, though<br>&gt; it doesn't seem like it should be too tough.<br>&gt;<br>&gt; I am also using Chameleon (the Keymap DHTML widget).&nbsp;&nbsp;However, I think<br>
&gt; my first task towards accomplishing this would be on the MapServer end.<br>&gt; When I place a second Reference object in the mapfile, I receive the<br>&gt; error that there is a&nbsp;&nbsp;dupilcate item:<br>&gt;<br>&gt;<br>&gt; *Warning*: [MapServer Error]: getString(): Duplicate item (IMAGE):(line
<br>&gt; 49) in *C:\ms4w\apps\chameleon\htdocs\common\wrapper\map_session.php* on<br>&gt; line *215*<br>&gt;<br>&gt; *Warning*: Failed to open map file<br>&gt; C:\ms4w\apps\chameleon\lscmp\htdocs/../map/wlscmp.map in<br>&gt; *C:\ms4w\apps\chameleon\htdocs\common\wrapper\map_session.php* on line *215*
<br>&gt;<br>&gt; *Fatal error*: Call to a member function on a non-object in<br>&gt; *C:\ms4w\apps\chameleon\htdocs\widgets\KeyMapDHTML\KeyMapDHTML.widget.php*<br>&gt; on line *115<br>&gt;<br>&gt;<br>&gt; *<br>&gt; Might there be a simple solution?&nbsp;&nbsp;Or would I need to rewrite a bunch of
<br>&gt; code somewhere (if so, where?)?&nbsp;&nbsp;I would really appreciate any hints you<br>&gt; can pass along.&nbsp;&nbsp;Thanks in advance for your help!<br>&gt;<br>&gt; Jennifer Zeisloft<br>&gt; UW Sea Grant<br><br>--<br>+-----------------------------------------------------------------+
<br>|Paul
Spencer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a>&nbsp;&nbsp; |<br>+-----------------------------------------------------------------+<br>|Applications
&amp; Software
Development&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>|DM
Solutions Group
Inc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.dmsolutions.ca/|">http://www.dmsolutions.ca/|</a><br>+-----------------------------------------------------------------+<br></blockquote></div><br>