MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MapPoint Map Refresh

This is a discussion on MapPoint Map Refresh within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I'm using VB6 and the Mappoint control to build a EXE that include some map functionalities. The problem is ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-22-2005
Junior Member
White Belt
 
Join Date: Jan 2005
Posts: 2
MapPoint Map Refresh

Hello,

I'm using VB6 and the Mappoint control to build a EXE that include some map functionalities. The problem is that when I add a pushpin or other items on the map then the map is updated at every code instruction. Is there a way to draw some items without updating the map at every instruction?

Example of code
Code:
Set item = myMap.Shapes.AddLine(loc1,loc2)
item.Line.ForeColor = intForeColor
item.Line.EndArrowhead = True
item.Line.Weight = 0
When I run this code I see first the blackline, then the arrow, at last the weight.

Same problem when creating pushpins. In this case first I see the pushpin icon then the car icon (myDataSet has Symbol=car)

Code:
Set item = myMap.AddPushpin(loc1, "MyName")
item.MoveTo myDataSet
Is there a way to run easily some code in the MapPoint thread? I think at every instruction there is the delay for the thread switch between my application and the hidden mappoint application.

Thank you for any help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-23-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Datasets

You want to use a Dataset to perform batch pushpin assignment.


Tim Miltz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 01-23-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: MapPoint Map Refresh

Hi,

Quote:
Originally Posted by andreaplanet
The problem is that when I add a pushpin or other items on the map then the map is updated at every code instruction. Is there a way to draw some items without updating the map at every instruction?
I think this is typical behaviour of MP2004. With MP2002 this was not the case. The updating slows down but for a user it 'seems' faster. I have search but did not found any property/method to disable it.

Quote:
Is there a way to run easily some code in the MapPoint thread? I think at every instruction there is the delay for the thread switch between my application and the hidden mappoint application.
I'm pretty sure that all GUI updates happens in same main thread context. Also all method calls to MP are sync, if they should execute in a separate thread they would by async. However this is just a conclusion of me without knowing the deeper insights of mappoint. Someone will clarify if I'm wrong I hope
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 01-23-2005
Junior Member
White Belt
 
Join Date: Jan 2005
Posts: 2
Re: MapPoint Map Refresh

Quote:
Originally Posted by Wilfried
I'm pretty sure that all GUI updates happens in same main thread context. Also all method calls to MP are sync, if they should execute in a separate thread they would by async. However this is just a conclusion of me without knowing the deeper insights of mappoint. Someone will clarify if I'm wrong I hope
Hi Wilfried,

When you run the map there is a "hidden" process "MapPoint.exe", check the taskmanager, so there is some kind of interprocess comunication. And I fear that this happen at every instruction call. It's relatively fast, in other similar situations i realized a delay of some milliseconds for every instructions due to the necessary context switch between the two processes. I still not tried to add something like 10000 items but I fear that the process will be very slow.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 01-23-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi,

Yes, for each mappoint component you drop on a form a mappoint.exe instance is started in background. mapooint.exe is in this case a COM server for your application. Each method is sent to it and returns with the appropriate data.

Of course this gives delays, and if you wants to drop honderds or more pushpins on your map you will have incredible delays. But these delays are not nececarly because the delay of interprocess.

For a large amount of data is nececarly to study (or better trial and error) to see what the most gain gives in speed. Not very easy all the time
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 06-07-2005
Junior Member
White Belt
 
Join Date: May 2005
Posts: 9
Re: Datasets

Quote:
Originally Posted by tfmiltz
You want to use a Dataset to perform batch pushpin assignment.


Tim Miltz
How would one do this? There doesn't seem to be any way to AddPushpin(...) to a DataSet. At least I haven't found it yet.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-27-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 4
Re: MapPoint Map Refresh

I have the exact same problem as Andreaplanet. Creating many pushpins at the same time takes very long because the addPushpin() method automatically refreshes the map.

I need to disable the map auto-refresh.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 11-27-2006
Junior Member
Yellow Belt
 
Join Date: Apr 2006
Posts: 18
Re: MapPoint Map Refresh

I had much the same problem using addPushpin for a whole bunch of pushpins. On my dev machine, adding about 3000 pushpins (from my db) used to take between 90 and 120 seconds.

What I now do is to export my data into a CSV (with 3 columns - Latitude,Longitude,Name) and then use the ImportData method:-

Dim ds As MapPoint.DataSet
ds = Map.DataSets.ImportData(Filename)
ds.Symbol = 1 [or whatever symbol you want]

The same 3000 pushpins now take about 3 seconds to load!

John
__________________
John Lewis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 11-27-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 4
Re: MapPoint Map Refresh

Quote:
Originally Posted by jlewis View Post
What I now do is to export my data into a CSV (with 3 columns - Latitude,Longitude,Name) and then use the ImportData method
Seems a very good workaround to me, thanks.

But disabling the auto-refresh would still be a better solution. Anyway, this workaround will be very useful, even though not the solution I was looking for.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 11-27-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,381
Blog Entries: 1
Re: MapPoint Map Refresh

I wonder if it will speed it up if you make the Application not visible? (Set visible to False.)

Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
map, mappoint, refresh


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How can I refresh the data link from VB flymoe MapPoint 2006/2009 Discussion 2 10-21-2004 06:46 AM
How to refresh a Map Anonymous MapPoint 2006/2009 Discussion 1 01-03-2003 03:42 PM
Mappoint-Refresh linked data on a form load event .... Anonymous MapPoint 2006/2009 Discussion 1 10-22-2001 01:38 PM
Is there a way to change the GPS refresh rate to l.... Anonymous MapPoint 2006/2009 Discussion 1 08-24-2001 07:33 AM
Is there any way to refresh just one PushPin Layer.... Anonymous MapPoint 2006/2009 Discussion 1 07-27-2001 09:29 AM


All times are GMT -5. The time now is 01:40 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Flights USA
Book low cost flights to the USA quickly and easily online at Holiday Hypermarket. Florida, California, Las Vegas and New York are among the exciting range of destinations.

Travel Agent
Travel Counsellors was voted UK's Best Travel Agent at the Guardian Unlimited travel awards.

Holiday to Thailand
Want to go somewhere new? Book a low cost holiday to Thailand at dealchecker.co.uk. See the stunning national parks and uninhabited islands.

Cuba Holidays
Cuba holidays offer an exciting cultural and wonderful culinary experience. Book with The Holiday Place for a great deal.

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.

Family Holidays
Family holidays can be great fun. Check out your options at Travel.co.uk

Holidays in Fuerteventura
Need a break? Go to the Canary Islands! Find information on holidays in Fuerteventura at On The Beach.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52