Community of VE/MapPoint Users and Developers
This is a discussion on Sum of Items within a Radius? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Relatively new to mappoint - question is this: IS there a way to count up the number of items within ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Sum of Items within a Radius? IS there a way to count up the number of items within a selected radius? I am asking this to find a way to count sales within a radius or any item. I know mappoint can sum the imported data through metro areas, but I didn't know if there was a way within mappoint, or a plugin or tool, that would allow me to do this. thanks! mc |
| |||
|
Hi, Yes very easy to do. I just made this testcode to see if it works: Code: private void selectedareaToolStripMenuItem_Click(object sender, EventArgs e)
{
MapPoint.SelectedArea sa = MP.ActiveMap.SelectedArea;
Location[] loc = new Location[5];
loc[0] = MP.ActiveMap.XYToLocation(sa.Left, sa.Top);
loc[1] = MP.ActiveMap.XYToLocation(sa.Left + sa.Width, sa.Top);
loc[2] = MP.ActiveMap.XYToLocation(sa.Left + sa.Width, sa.Top + sa.Height);
loc[3] = MP.ActiveMap.XYToLocation(sa.Left, sa.Top + sa.Height);
loc[4] = loc[0];
MP.ActiveMap.Shapes.AddPolyline(loc);
int PPCount = 0;
foreach (MapPoint.DataSet ds in MP.ActiveMap.DataSets) {
MapPoint.Recordset rs = ds.QueryPolygon(loc);
rs.MoveFirst();
while (!rs.EOF) {
PPCount++;
rs.MoveNext();
}
}
Console.WriteLine("Record count " + Convert.ToString(PPCount));
}
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint Wish List Items | Harv | Wish List | 1 | 07-08-2003 01:28 PM |
| Remove items from the menu | Zanzibar | MapPoint 2006/2009 Discussion | 0 | 12-23-2002 04:39 AM |
| Non Mapped Items | Anonymous | Wish List | 0 | 12-17-2002 02:33 AM |
| Not mapped items | Anonymous | Wish List | 0 | 11-15-2002 12:18 PM |
| After you geocode a list of items from an excel fi.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-29-2000 07:00 PM |
Flights Malaga
Costa Del Sol is known as a destination for the rich and famous. Don't be put off, with Holiday Hypermarket you can book cheap flights and accommodation.
Best Travel Agent
Travel Counsellors has been named the UK's Best Travel Agent at the Guardian Unlimited Travel awards.
Cheap Holidays to Turkey
If you’re looking for cheap holidays to Turkey then dealchecker.co.uk is the place for you! Our search helps you see real prices from the UK’s top holiday companies all in one go.
Holidays to St Lucia
Holidays to St Lucia will leave you smiling. The spectacular scenery and the warmth of the locals make holidays to St Lucia unforgettable.
Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.
Inclusive Holidays
At Travel.co.uk travel comparison will help you plan the perfect inclusive holidays.
Holidays in Florida
Take a break! Enjoy stunning coastline! Info on holidays in Florida available at On The Beach!