VB programming with Mappoint Add-in, Pushpin issues

Discussions about AccuTracking software and web tracking.
Post Reply
JeePaRoo
Junior Member
Posts: 53
Joined: Wed Mar 03, 2004 1:32 pm
Location: Columbus, Oh
Contact:

VB programming with Mappoint Add-in, Pushpin issues

Post by JeePaRoo »

first off let me start out with what im doing. I am ustilizing Accu-tracking as part of my Home Automation system and website.

I have a licensed copy of Mappoint 2006 and am using the Accutrack Add-in.

currently i have a Small VB Application I wrote which calls the avtiveX to Mappoint. when I run my VB App it spawns Mappoint and loads up my saved map. Accutracking then adds the points to the map as it is refreshed once per minute.

the VB app through the activeX saves the map file as a web page. it then takes the GIF file created by mappoint and converts it to a JPG via another activeX control.

This allows my touchscreen software (MainLobby) to load the JPG and shows my whereabouts to my roomates at my house. and also is used in a private Website.

NOW is wherein the issues resides.. the fact that MANY pushpins are created as i have the system set to use smart refresh for accutrack and once / minute on the mappoint Addin. so I thought id write a routine to delete the Pushpins, However Accutrack creates EVERY pin with the SAME name and so my data query always returns "nothing" as the data is ambiguous.

why do i want to delete the pins? for a couple reasons.

1] I often take VERY LONG roadtrips and so the map zoom ends up WAY OUT to zoom in on all of the pushpins so no one can hardly tell where im at at least not very close. Id like to have only the last 2 pushpins displayed and the rest gone.

2] I have the bubbles printed so people can see what time the refresh was made. I realize logging onto the website can show when the last refresh was done, however that will not suffice for the touchscreen software in the house..

Now I realize this isnt a VB or a mappoint forum but I know you guys probably work with both so im asking here if you can uniquely identify each pushpin so I can have a chance in finding it.. maybe instead of each pin being "cadikid" it could be cadikid1, cadikid2,cadikid3 etc so I would have a chance at identifying them. this way I could work with this in my own code... which im more than willingto share with others who may want to utilize the functionality.

this would also allow me to hide the bubbles for the pins as well..

any help from accu-track or anyone else is greatly appreciated.
-Christopher

ATSupport
AccuTracking Staff
Posts: 1882
Joined: Tue Jan 27, 2004 4:36 pm
Contact:

Post by ATSupport »

Maybe you can parse the timestamp of the pushpin and use it as the identifier?
AccuTracking Support
support(at)accutracking.com

JeePaRoo
Junior Member
Posts: 53
Joined: Wed Mar 03, 2004 1:32 pm
Location: Columbus, Oh
Contact:

Post by JeePaRoo »

from what I can tell the only way to select a pushpin is by the findpushpin method and this requires the name. it appears to return a dataset with "nothing" if the name is ambiguous that i search for. if I manually pop a pushpin on my map and then use my program to search for it, it does find it it once the ambiguoty is gone. say my pushpins from accutrack are all named "cadikid" and I manually stick a pin named "cadikid12" on the map, if I search on "cadikid" I get no results", if I search on "cadikid1" I get no results, if I search on "cadikid12" I get the data for my pin. alas with a number after each one I could write a routine to find the highest number on the map, basicilly each time my program started it would go searching till it got a hit and go from there.. because as i say a couple things are the problem, one is the map zooms out too far and yes I can zoom it back in via my program however i have to be able to find the newest pushpin to zoom in on, also there are just too many ballons on the map as I refresh often esp when using smartsend on the phone side it fills up quickly. since my users (in this case my roomates) dont have access to the actual mappoint itself (if they did with my luck theyd shut the server down that controls my house) they cant turn the bubbles on or off but again if i can select a pushpin I can control the bubbles on a per pin basis...
-Christopher

ATSupport
AccuTracking Staff
Posts: 1882
Joined: Tue Jan 27, 2004 4:36 pm
Contact:

Post by ATSupport »

You can use the following code in VB to get the the latest added pushpin without knowing the name:

objMap.DataSets.Item(objMap.DataSets.count)
AccuTracking Support
support(at)accutracking.com

Post Reply