MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




zoom in on pushpin

This is a discussion on zoom in on pushpin within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi All I am using the following code to select a pushpin where mc1 = a ocx on the form. ...


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 10-22-2003
starbuck's Avatar
Member
Green Belt
 
Join Date: Oct 2003
Posts: 68
zoom in on pushpin

Hi All

I am using the following code to select a pushpin where mc1 = a ocx on the form.

Dim objPin As MapPoint.Pushpin

Set objPin = mc1.ActiveMap.FindPushpin(veh_list)
On Error GoTo er
objPin.Select


This works fine but what I also want to do is centre the map to the pin and then zoom in. Can anyone suggest the best way to do this

Thanks in advance.
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 10-23-2003
Junior Member
White Belt
 
Join Date: Jan 2003
Posts: 9
Dim objPin As MapPoint.Pushpin

Set objPin = mc1.ActiveMap.FindPushpin(veh_list)

'try this:
mc1.ActiveMap.DataSets.ZoomTo
'-----------------------------------------------

On Error GoTo er
objPin.Select
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 10-23-2003
starbuck's Avatar
Member
Green Belt
 
Join Date: Oct 2003
Posts: 68
zoom in on pushpin

Hi Rainer
Thanks for the reply, it works in that it centres on all the pins on the grid, I just want to zoom in on the highligted pin.
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 10-24-2003
Junior Member
White Belt
 
Join Date: Jan 2003
Posts: 9
Dim oRes As FindResults


'Set objPin = mc1.ActiveMap.FindPushpin(veh_list)

' This will zoom the map to a particular pin
' (but maybe you won't like this yellow circle):
Set oRes = mc1.ActiveMap.FindPushpin(veh_list).Location.FindN earby(0.1)
' i hope this helps -> greetings from germany
'forget this:
'mc1.ActiveMap.DataSets.ZoomTo
'-----------------------------------------------

On Error GoTo er
objPin.Select
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 10-24-2003
Junior Member
White Belt
 
Join Date: Jan 2003
Posts: 9
'sorry for spamming again!
' the ultimate solution:

Dim oLoc As Location
Dim oPin As Pushpin
Dim dbLat As Double
Dim dbLon As Double


Set oLoc = mc1.ActiveMap.FindPushpin(veh_list).Location
Call CalcPos(mc1.ActiveMap, oLoc, dbLat, dbLon)
mc1.ActiveMap.GetLocation(dbLat, dbLon, 0.1).GoTo

'The CalcPos - routine you will find here: (Many thanks to Gilles!!!)
'http://www.mp2kmag.com/articles.asp?ArticleID=13&key=extract.lat.lon
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 10-24-2003
starbuck's Avatar
Member
Green Belt
 
Join Date: Oct 2003
Posts: 68
zoom in on pushpin

Rainer, you are a star, many thanks bud.
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
pushpin, zoom


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
Drawing / Zoom Anonymous MapPoint 2006/2009 Discussion 1 04-04-2005 07:59 AM
Mappoint-ZOOM Anonymous MapPoint 2006/2009 Discussion 1 10-28-2004 08:56 AM
Zoom to selection? sthurlock MapPoint 2006/2009 Discussion 6 12-10-2003 07:53 PM
Zoom In and Zoom Out event detection victorf MapPoint 2006/2009 Discussion 2 10-22-2003 01:56 AM
Exclude a pushpin From Zoom piazzat MapPoint 2006/2009 Discussion 0 09-05-2002 10:12 AM


All times are GMT -5. The time now is 11:44 AM.


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


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 53 54