MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to access to an array of pushpins that were added ?

This is a discussion on How to access to an array of pushpins that were added ? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi I have an application that : 1- displays a map 2- retrieves coordinates from a remote application 3- add ...


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-12-2005
Junior Member
Yellow Belt
 
Join Date: Jan 2005
Posts: 21
How to access to an array of pushpins that were added ?

Hi

I have an application that :

1- displays a map
2- retrieves coordinates from a remote application
3- add these coordinates on a map as pushpins

I would like to know if there's a way to access to these pushpins with an array ? I need to show the label of a selected pushpin only and I need to access to an array of all the pushpins that were added to the map...

Is that possible ?
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-12-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 847
Blog Entries: 7
Yes, they're stored as "pushpin sets". You can have multiple pushpinsets, but you have probably added your pushpins to the default "My Pushpins".
This in turn is a "Recordset". If you look up "Recordset" in the help it will show you how to access them.

Eg. to get the names of the pushpins in VB6, I have the following code:
Code:
' pushpinset,  dsidx is an index that is passed in
' you could query oMap.DataSets until you find the required pushpinset
Dim oDS As MapPoint.DataSets
Set oDS = oMap.DataSets
Dim thisDS As MapPoint.DataSet
Set thisDS = oDS.Item(dsidx)
        
' loop over each pushpin, saving the name
        
Dim oRS As MapPoint.Recordset
Set oRS = thisDS.QueryAllRecords()
        
Dim n As Long
n = thisDS.RecordCount
        
ReDim SrcNameArray(n) As String
        
oRS.MoveFirst
Dim ii As Integer
ii = 0
Do While Not oRS.EOF
         ii = ii + 1
         Set pp = oRS.Pushpin
         SrcNameArray(ii) = pp.Name
         oRS.MoveNext
Loop

The above is an extra of a program I have - I've taken out some extra code to keep things simple and easier to understand what is happening.
Combined with the help that comes with MapPoint, it should get you going!


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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-12-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thank you... But I work in C#...

Anyway I've found an alternative but very specific to my code (using ID in a listbox...) so posting the source wouldn't be helpful for anyone...

Anyway your source could help me because I work on many projects

Thanks!!!
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-12-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Quote:
Originally Posted by Jaba-
I've found an alternative
Possible that your alternative way can benefit other. If you like to post code snippets it should be very welcome !
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-13-2005
Junior Member
Yellow Belt
 
Join Date: Jan 2005
Posts: 21
I won't post the code because there are many parts... and these are very specific to my source code... But I can describe how to do :

The purpose is to add pushpins on a map and access them individually without using datasets

1- Add many pushpins on the control with AddPushpin() function
1b- For each added pushpin, add a value in a listbox
1c- The value in the listbox must be unique and must also be assigned to the PushPin.Name property

2- When the user need to find a pushpin, he must click on a value in the listbox and then we search for the clicked pushpin by FindPushpin(ClickedValueInList) function

Thats'all folks
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
access, added, array, pushpins


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
Filtering pushpins..Updating MapPoint by Microsoft Access Rodde MapPoint 2006/2009 Discussion 4 11-18-2005 04:22 AM
UpdateLink / PushPins / Access DB / HELP!!! SeanMcGinty MapPoint 2006/2009 Discussion 0 12-13-2004 05:31 PM
Access Pushpins johnnyo MapPoint 2006/2009 Discussion 4 01-08-2004 06:15 AM
Adding pushpins and viewing map from access project Dazzer MapPoint 2006/2009 Discussion 2 11-07-2003 05:09 AM
Using MP2002 I've added some pushpins to a map via.... Anonymous MapPoint 2006/2009 Discussion 1 07-18-2001 01:01 PM


All times are GMT -5. The time now is 01:47 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

Cheap Skiing
When it comes to cheap skiing, Holiday Hypermarket will speed you on your way. Searching the leading travel brands, Holiday Hypermarket offers you great value skiing.

Italy Holidays
Find and book Italy Holidays with Travel Counsellors. Holiday destinations around the world including Italy.

Holiday in Turkey
A Holiday in Turkey is great value when you book with dealchecker.co.uk. There is an abundance of things to see and do. Check out the well-preserved Greco-Roman ruins.

Cancun Holidays
Cancun holidays offer beautiful scenery, calm waters and plenty of shopping. Get a taste of the good life while on holiday in Cancun.

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.

Comparison Holidays
Travel.co.uk is a travel comparison service which makes it easy for you to find and plan the best holidays.

Holidays to Portugal
Want to take your family on a summer holiday? Visit On The Beach for more information on holidays to Portugal.


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