Radio Plot

Here's a sample app that plots push pins of different colours into MapPoint 2002.

The app reads a CSV file.

Here's the contents of the one used above:

52.0, -0.1, -10.0
52.0,  0.0, -20.0
52.0,  0.1, -30.0
52.0, 0.11, -40.0
52.0, 0.12, -50.0
52.0, 0.13, -60.0
52.0, 0.14, -70.0

Here's version 1.01 the app.

(Extended colours, UNIX style new lines)

Here's the MFC VC++ source.

The key bits:

In InitDialog:

m_mpApp.CreateDispatch("MapPoint.Application");
m_mpApp.SetVisible(true);

For each CSV record:

/////////////////////////////////////////////////////////////////////////////
void CMapautomationDlg::ProcessLine(const char * pBuffer) 
/////////////////////////////////////////////////////////////////////////////
{
    double dlat, dlong, dsig;

    if (::sscanf(pBuffer, "%lf,%lf,%lf", &dlat, &dlong, &dsig) != 3)
        return;

    Mp_Map mp = m_mpApp.GetActiveMap();
    mpLocation loc =mp.GetLocation(dlat, dlong, 0.0);
    MpPushpin pp = mp.AddPushpin(loc, "");

    int pin_colour = 15 + (int)(dsig/-10.0);
    pp.SetSymbol(pin_colour);
}

Back to the Mapping page

VERSION 1.01 

Push pins colours are mapped to signal strength as below: 

int pin_colour = 65; // black cross

if (dsig < -135.0)
{
pin_colour = 34; // small sq yellow 
}
else if (dsig < -125.0)
{
pin_colour = 35; // small sq white 
}
else if (dsig < -115.0)
{
pin_colour = 38; // small sq green
}
else if (dsig < -105.0)
{
pin_colour = 17; // small red
}
else if (dsig < -95.0)
{
pin_colour = 18; // small yellow
}
else if (dsig < -85.0)
{
pin_colour = 19; // small white
}
else if (dsig < -75.0)
{
pin_colour = 22; // small green
}
else if (dsig < -65.0)
{
pin_colour = 25; // big red
}
else if (dsig < -55.0)
{
pin_colour = 26; // big yellow
}
else if (dsig < -45.0)
{
pin_colour = 27; // big white
}
else if (dsig < -35.0)
{
pin_colour = 30; // big green
}