jepar wrote:
> Is it possible to change the color of the selected features in Mapguide
> 2009. I am using Studio 2009. The blue that mapguide uses by default is
> the same color as some of my features (feature colors should not be
> changed). How do I do this. Thanks.
The following RFC for MapGuide Open Source makes it possible that a
future version of Enterprise may allow you to specify the selection
colour, on a per-install basis:
http://trac.osgeo.org/mapguide/wiki/MapGuideRfc38
The changes have already been done in the AJAX viewer files, but it
doesn't look like they made it into the distributed version:
http://trac.osgeo.org/mapguide/browser/branches/2.0.x/MgDev/Web/src/viewerfiles/ajaxmappane.templ?rev=3354#L334
http://trac.osgeo.org/mapguide/browser/branches/2.0.x/MgDev/Web/src/viewerfiles/ajaxmappane.templ?rev=3354#L1695
I just played around with this a little and was able to hack a new
selection colour into the AJAX viewer by looking for the RequestMapImage
function in the ajaxmappane.templ file, changing the request version to
2.0.0 and adding this string to the end of the GETDYNAMICMAPOVERLAYIMAGE
request:
+ "&BEHAVIOR=7&SELECTIONCOLOR=FF530099"
Which gives you an orange selection (RGBA). The complete modified line
should look something like (all on one line):
url = webAgent +
"?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&FORMAT=PNG&VERSION=2.0.0&SESSION="
+ sessionId + "&MAPNAME=" + encodeComponent(mapName) + "&SEQ=" +
Math.random() + "&BEHAVIOR=7&SELECTIONCOLOR=FF530099"
As always, be sure to make backups before making this kind of change,
and be aware of any restrictions that the MapGuide Enterprise license
agreement may place on such modifications.
Jason