spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  MAPPOINT Q & A  

Top | Post New Question | Read All | MP2K Asks Microsoft

581 Zia - January 17, 2002

Requirement:

We are looking for a software program that would allow us to enter 15000 locations, then by typing in one location (street+city+state or zip), pull up a list of all locations within, say, a 5, 10 or 20 mile radius. The user should be able to enter the location and the radius on web page and would see a map of the location with nearby locations marked on it and a list of the same nearby locations.

Solution:

I used Mappoint to achieve this using the following process:
- I created a map and imported 15,000 locations into 2 datasets (pushpin sets.2 setsare required as it cannot import more than 10000 in one set).
- I wrote a DLL that connects to the Mappoint software, calls the FIndAddressResults() method to find the user entered location.
- It then calls QueryCircle() method on eash dataset to find all locations falling in the user provided radius. It takes the resultsets, calculates each location's distance to the user entered location and sorts the list.
- It then calls Union() method and GOTO() methods to zoom to the area with the locations searched and saves the map as an HTML page.
- It then displays the list to the locations found nearby to the user with the map image extracted from the saved HTML page.
- This DLL gets called from the ASP page which provides the user interface to enter the location to search and the radius.

By doing so, I was able to get results. But when I did a stress testing by making multiple request simultaneously (made 10 requests for testing purpose) to the web page, it seemed to slow down to an unacceptable extend. I saw 3-4 MapPoint.exe processess running and taking 100% of the CPU. This made the whole web site so slow that it took a few minutes to serve a web page on a T1 connection. Also the resulting locations and maps came up for all the requests but it took an average time of 2-3 minutes for it to provide the location results. This made the solution unacceptable.

Questions:

My question is, Did I do this right?
Is there a better way of implemention the solution which would make it work faster and not take over 100% of cpu?
Is this product recommended for use in such web related scenario?

Answer:

Based on the EULA, you are not allowed to use this solution. It says, "This license does not give you a right to allow anyone to access or use the Software Product over the Internet."

Beyond that, you didn't necessarily do anything wrong technically, assuming you remembered to destroy all of your objects in your DLL and in ASP as soon as you were done with them. Also, this assumes that you didn't put a MapPoint object into an ASP Session variable. That would be very bad.

Since the objects created by MapPoint are large, creating several instances in a stress test will almost certainly cause problems. MapPoint is not engineered to be a server application.

Did you create your DLL as a COM/COM+ object to run under MTS/Component Services? If you didn't, you should. COM should potentially improve the scalability.

- Walt Cygan

Post New Answer / Follow-up


Google
 
MP2Kmag Internet


 Recent Discussion
 Resources


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.