Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Selected Feature Color

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
554 Views, 5 Replies

Change Selected Feature Color

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.
5 REPLIES 5
Message 2 of 6
dswilson
in reply to: Anonymous

Currently I don't believe it's possible to change the selection color. That has been a wishlist request from several users.

Regards,
Dave
Message 3 of 6
Anonymous
in reply to: Anonymous

Message 4 of 6
Anonymous
in reply to: Anonymous

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
Message 5 of 6
Anonymous
in reply to: Anonymous

> {quote:title=Jason wrote:}{quote}
> The changes have already been done in the AJAX viewer files, but it
> doesn't look like they made it into the distributed version

The last version of MapGuide Entreprise 2009 (Update 1) includes the new version of the AJAX viewer.
So, now it's very easy to change the color of the selection 😉

www\viewerfiles\ajaxmappane.templ
line 334
var selectionColor = '0x0000FFFF'; // Blue
Message 6 of 6
dswilson
in reply to: Anonymous

Sweet. I was not aware that variable was exposed in the update.

Thanks,
Dave

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report