I trying to use MapPoint 2004’s activeX control to plot lat/lon based data which includes color information. I have around 5K points that I would like to plot but MapPoint’s initial rendering is very, very, very slow. Below is the code I’m using to pass data to MapPoint, I’m also using AxMappointControl.BeginInit and EndInit while i’m adding the shapes to the map. Can someone please tell me how to improve the rendering speed? Thanks in advance.
Bryan
NOTE: I’m using shapes because it appears to be the only way to keep control of the color.
Rendering For Loop
for (int i=0; i<num_recs; i++)
{
MapPoint.Location loc = oMap.GetLocation(lat_data[i], long_data[i], 0);
MapPoint.Shape shape = oMap.Shapes.AddShape(MapPoint.GeoAutoShapeType.geo ShapeOval, loc, 6, 6);
shape.Line.Visible = false;
shape.Fill.Visible = true;
Color color = Color.FromArgb(color_data[i]);
// Convert from arbg to rgb
byte a = 0x00, r=color.R, b=color.B, g=color.G;
int rgb_color = ((((a)&0xff)<<24)|(((b)&0xff)<<16)|(((g)&0xff)<<|((r)&0xff));
shape.Fill.ForeColor = rgb_color;
}