MapXtreme 7.0 Themes Cant customize the styles

132 views
Skip to first unread message

Gabe

unread,
Jan 11, 2012, 12:39:22 AM1/11/12
to mapi...@googlegroups.com
Hi

I maintain  a Desktop application using MapXtreme 7.0 and I have
trouble finding much documentation or useful examples (I do have the
pdfs, samples etc that come on the install discs)

Currently I am trying to programmaticly apply an IndividualValueTheme
to a FeatureLayer.  I can apply a standard default theme,  I can also
show a ModifyIndValueThemeDlg and let the user change the theme.
However what I want to do is apply my own theme to the layer without
user intervention.

The following code attempts to do this but results in the Layer
showing with the default IndividualValueTheme (ie not with my styles)

Any help would be greatly appreciated


void ApplyTheme(FeatureLayer lyr)
{
if (lyr.Modifiers.Contains(HarvOpsTheme) ||
lyr.Modifiers.Contains(HarvOpsRangedTheme))
return;

HarvOpsTheme = new IndividualValueTheme(lyr, "iOperationType",
"HarvOpsTheme");

lyr.Modifiers.Append(HarvOpsTheme);

HarvOpsTheme.Bins[0].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(255,
255, 0)));
HarvOpsTheme.Bins[1].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(0,
255, 0)));
HarvOpsTheme.Bins[2].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(128,
128, 0)));
HarvOpsTheme.Bins[3].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(192,
128, 0)));
HarvOpsTheme.Bins[4].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(0,
128, 0)));
HarvOpsTheme.Bins[5].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(0,
205, 128)));
HarvOpsTheme.Bins[6].Style.ApplyStyle(GetHollowAreaStyle(Color.FromArgb(255,
0, 0)));

HarvOpsTheme.Apply(HarvOpsTheme);
HarvOpsTheme.RecomputeStyles();

lyr.Invalidate();
}

AreaStyle GetHollowAreaStyle(Color color)
{
return new AreaStyle
{
Interior = StockStyles.HollowFillStyle(),
Border = new SimpleLineStyle(new LineWidth(1,
LineWidthUnit.Pixel), 1, color)
};
}

Thanks

Gabe

Gabe

unread,
Feb 8, 2012, 7:11:51 PM2/8/12
to mapi...@googlegroups.com
I guess no-one here can help with this. 

The MapXtreme documentation is weak and there doesnt seem to be much of a community for it.

Unfortunately I have to maintain a MapXtreme app,  I really want to completely remove MapXtreme but at this stage we havent got the resources for that.  So I am asking can anyone point me towards any MapXtreme support ?

Bill Thoen

unread,
Feb 8, 2012, 9:11:04 PM2/8/12
to mapi...@googlegroups.com
I think there's a forum for mapXtreme on MapInfo's web site under Support. Since I don't do much with NapXtreme these days, I haven't looked into it very much.

Regards,

Bill Thoen
GISnet
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

Gabe

unread,
Feb 12, 2012, 9:31:31 PM2/12/12
to mapi...@googlegroups.com
Unfortunately the Mapinfo forums have been 'retired' I found an old link to the correct forum (http://community.mapinfo.com/forums/forum.jspa?forumID=88) but that gives a 404 error after searching there I found a page that says this:

The MapInfo Online Forums have been closed. For an alternative please see the MapInfo-L Google Group found here: 
http://groups.google.com/group/mapinfo-l?pli=1 

Or please see our Technical Support page: 
http://www.pbinsight.com/support 

The first link is this group and the Tech support page just lists the inadequate (for this task) documentation I mentioned previously.  It does have a contact email so I have sent them a message.

Thanks for your efforts.
Reply all
Reply to author
Forward
0 new messages