You need to log in before you can comment on or make changes to this bug.
I added a link to chameleon sample. When I access this link all the widgets correctly appear but the image inside the keymap is not showing. The keymap.png is in the ../htdocs/images directory. Details Chameleon 1.1 downloaded from cvs exp_1_1 cwc common downloaded from php_utils/src Here is the lines I modified inside the index.html include( "/home/nsavard/proj/cwc2/htdocs/chameleon.php" ); $szTemplate = "sample.html"; $szMapFile = "/home/nsavard/proj/cwc2/chameleon_sample/map/chameleon.map"; ------------------------ Here is the symbolic links I made: cwc2 -> /home/nsavard/proj/cwc2/htdocs/ cwc2_admin -> /home/nsavard/proj/cwc2/htdocs_admin/ cwc2_demo -> /home/nsavard/proj/cwc2/chameleon_sample/htdocs/ ----------------------- Here is the php log errors: PHP Notice: Undefined offset: 1 in /usr2/home/nsavard/proj/cwc2/htdocs/common/wrapper/map_session.php on line 801 ------------------ cwc2 config info: everything appear ok but I do not have gif, pdf and swf support ---------------------- cwc2.xml file---> server_data_path: /home/nsavard/proj/cwc2/data web_server_path: http://127.0.0.1/msapps/nsavard/programs/cwc2 ows_schemas_location: http://ogc.dmsolutions.ca URL pointing to the root of a repository of OGC schemas. See http://ogc.dmsolutions.ca for an example. wms_parse_file: /home/nsavard/proj/cwc2/htdocs/common/wmsparse/wmsparse default_template: /home/nsavard/proj/cwc2/htdocs/simplest.html Template to display if session is invalid. default_context: /home/nsavard/proj/cwc2/htdocs/gmap_context.xml Default map context to load when starting this application map_template: /home/nsavard/proj/cwc2/htdocs/template.map mapscript_module: php_mapscript_40.so log_path: /tmp/ tmp_web_path: /ms_tmp/ tmp_img_path: /tmp/ms_tmp/ context_root: /tmp/ template_root: /tmp/
Keymap also doesn't show in version 1.0.2 (using ms4w version)
Zak, please investigate, esp the 1.0.2 version. I suspect path issues in 1.0.2 and perhaps something else in 1.1.
Paul addressed this in an update to drawmap.php that replaced some deleted code that handled keymaps from url settings. Chameleon 1.1 doesn't do this and now uses mapscript directly to draw the keymap. I have verified this resolves the problem Norm described in both 1.02 and 1.1. Please update from php_utils cvs and test.
*** Bug 59 has been marked as a duplicate of this bug. ***
This bug is still existing in the chameleon_ms4w_1.1alpha3.zip. More precisely with the chameleon demo. (I got the same problem on Linux with the 10/16/2003 cwc exp_1_1 cvs update.) I tried to figure out where it is looking for the keymap.gif but without success. Also, in the map file the reference map is a gif file. But in the chameleon demo, under the chameleon_sample/images, there is no keymap.gif image (only keymap.png). I didn't change the chameleon configuration file. If I copy the image location of the keymap image into the browser, I got the following link: http://192.168.4.7/msapps/nsavard/programs/chameleon-1.1_20031016//common/wrapper/drawmap.php?map_session_mode=0&REQUEST=KEYMAP&sid=3f8f0ed6118a9 See the "//" before "common".
This bug is a serious problem for the IOOS prototype that is due on Monday. I only realized today that I cannot display a keymap in my CWC2 1.0.4 application on xcalibur. Is there a work around for this? I can't seem to get a keymap image to display no matter where I put it and no matter how I construct the path. Details: Using Mapserver 4.0 and CWC2 1.0.4 Template location: /home/msapps/ioos/htdocs/ioos.html Keymap location: /home/msapps/ioos/htdocs/images/keymap.png Path to keymap in template: ../../../../ioos/htdocs/images/keymap.png - this is assuming the image has to be relative to drawmap.php which is what I have been told is the case.
Another quick comment: this works on my local instalation of cwc2 1.0.4 for ms4w. :S In that case I made the path the keymap image relative to cwc2.php, but that doesn't work on xcalibur...
Okay, I've calmed down a bit now ;) More comments: I was able to get a keymap to show by putting it in /home/msapps/chameleon- 1.0.4/htdocs/images and using the path ./images/keymap_ioos.png in my widget tag. The actual problem I had was that my in my tag I had EPSG in upper case instead of lower case and that caused the keymap not to draw even though it was in the right place and the path was correct in the template. But the fact that a keymap image can't be pathed relative to the template or by using a URL is a problem, especially in cases where people won't have access to the chameleon installation. I'll file a new bug if one doesn't exist about the upper case/lower case thing.
check in 1.99 for release
updated version to 1.99
ok, so we need to get this fixed. According to Bug#127, all widget images are searched by 1) the app directory, 2) the web path, and 3) the chameleon dir. This does NOT apply to the keymap widget. It only works relative to the MAPFILE of the application (as in ../htdocs/images/icon_keymap.png) This is impossible to figure out for a new user (or me!!!!!!). We must make the same rules that apply to the rest of the widgets apply to the keymap. I'm not sure I agree with the "MINOR" severity either..it's enough to turn anyone off Chameleon.
to continue, following the relative image path rules for the other widgets, the keymap image should be searched for 1) relative to the template, 2) relative to the web path (I'm not even sure what Paul meant by that ha), and 3) relative to chameleon.php.
I don't think that the keymap image can be treated in exactly the same way because mapserver doesn't allow for a remote image to be used for this so the actual order will be: * absolute, leave as is * relative, check file system relative to application htdocs directory (subtle difference here .... not necessarily relative to template because the template could be in a different location from the 'index.phtml' file). * relative, check file system relative to chameleon htdocs directory I'll take this one.
fixed in cvs, the keymap image is assumed to be absolute or relative to the application (index.phtml)
verified using beta 2 2004-06-20
Sorry Verified on Windows ie6 and firefox 0.9
Verified on Fedora Core 1 with beta 2 20040625. There are only two cases described in comment # 14 and summarized here: "The keymap image is assumed to be absolute or relative to the application (index.phtml)." Is this alright Paul? If yes this bug could be closed.
yes, this is fine.