Community of VE/MapPoint Users and Developers
This is a discussion on Pushpins in current view within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, Is there an easy way to get all the pushpins in the current map view? (Mappoint 2004) Now I ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Pushpins in current view Is there an easy way to get all the pushpins in the current map view? (Mappoint 2004) Now I have the following solution: MapPoint.Location[] locations = new MapPoint.Location[5]; locations[0] = myMap.XYToLocation(myMap.Left, myMap.Top); locations[2] = myMap.XYToLocation(myMap.Left, myMap.Height); locations[4] = myMap.XYToLocation(myMap.Width, myMap.Height); locations[6] = myMap.XYToLocation(myMap.Width, myMap.Top); locations[8] = myMap.XYToLocation(myMap.Left, myMap.Top); and then a do a QueryPolygon on my dataset. Is there another (better/easier) way to do this? Thanks |
| |||
|
Not sure if you are are working in vb6 or what lang. Or with Dataset but perhaps the following will help bring further insight: The useful bit I found in a similar pursuit was the QueryAllRecords I've got some other non-relevant info here (some might say more than less !) just ignore that though. 'For each pushpin, output the lat/lon and symbol lines. For Each objDataSet In m_objMap.DataSets Set objRecordset = objDataSet.QueryAllRecords objRecordset.MoveFirst Do Until objRecordset.EOF CalcPos m_objMap, objRecordset.Pushpin.Location, dblLat, dblLon m_colMIFLines.Add "Point " & CStr(Round(dblLon, 6)) & " " & CStr(Round(dblLat, 6)) & vbCrLf m_colMIFLines.Add " Symbol (44,13395711,10)" & vbCrLf strnote = "" 'Add information in the balloon and note fields to the data to be written. For Each objField In objRecordset.Fields If objField.VisibleInBalloon Then strnote = strnote & objField.Name & ": " & CStr(objField.Value) & "> " End If Next If Len(strnote) >= 2 Then strnote = left$(strnote, (Len(strnote) - 2)) End If If objRecordset.Pushpin.Note <> "" Then strnote = strnote & IIf(strnote <> "", "> Note: ", "") & objRecordset.Pushpin.Note End If 'Add a data line to the mid file, including the pushpin data and symbol. m_colMIDLines.Add Chr$(34) & objRecordset.Pushpin.Name & Chr$(34) & "," & CStr(m_lObjectCount) & "," & objRecordset.Pushpin.Symbol & ",0," & Chr$(34) & left$(strnote, 255) & Chr$(34) & vbCrLf 'Update the object count. ' frmSpatialDataImport.lblRecordCount.Caption = "Shape Count: " & m_lObjectCount DoEvents m_lObjectCount = m_lObjectCount + 1 objRecordset.MoveNext Loop Next Tim Miltz Last edited by tfmiltz; 11-02-2007 at 03:47 AM. Reason: didn't sign |
| |||
| Re: Pushpins in current view
Thanks for your reply. I am working in C# .Net. To explain further, my goal is to get only the PushPins visible in the current view. I have a MapPoint dataset containing al the puspins that are placed on the map. Now I want a subset of this dataset containing only that pushpins that are visible in the current view of the map. E. van Dijk |
| |||
| Re: Pushpins in current view
Hi, Then calculate lat/long of the 4 corners of the map in view and you can easy calculate wht is in view or not
__________________ 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 |
| Stop Users from Deleting or Cutting Pushpins from map view | Yazzy | MapPoint 2006/2009 Discussion | 1 | 05-26-2005 02:56 PM |
| Saving current view of map | radiusdude | MapPoint 2006/2009 Discussion | 2 | 04-05-2005 07:36 AM |
| Getting current GPS coordinates in VB6 | Anonymous | MapPoint 2006/2009 Discussion | 2 | 06-10-2004 05:09 PM |
| get longitude/latidude of current view programmaticly | Anonymous | MapPoint 2006/2009 Discussion | 0 | 03-10-2004 04:45 PM |
| Is it possible to expand upon the current 255 push.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 04-16-2002 09:32 PM |
Exeter Flights
Visit Holiday Hypermarket online to find all the essential information about Exeter Airport and Exeter flights. Booking is quick, easy and cheap with Holiday Hypermarket.
Flights to Spain
Find and book flights to Spain. Travel Counsellors can help with travel to Spain including flights and accommodation.
Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.
Holidays in Dubai
Holidays in Dubai are an eclectic mix of the ancient and the modern. Discover an oasis of luxury amid the Arabian desert. Book here now!
Cheap Cyprus Holidays
Finding cheap Cyprus holidays can be difficult unless you know where to look and where to book. With ulookubook.com you can conduct a simple search to find the latest holiday deals to your particular destination.
All inclusive holiday
Travel.co.uk is a travel comparison service which makes it easy to search and find your all inclusive holiday.
Holidays in Florida
Take a break! Enjoy stunning coastline! Info on holidays in Florida available at On The Beach!