Code: Alles auswählen
'Namen jedes Objekts anzeigen, auf das der Benutzer auf der Karte klickt
Set objResults = objMap.ObjectsFromPoint(X, Y)
For Each objResult In objResults
MsgBox objResult.Name
Next
Code: Alles auswählen
IF VALTYPE(oResult) = "O"
iMax := oResult:Count()
IF iMax > 0
i := 1
FOR i := 1 TO iMax-1
SLEEP(40)
oWhat := oResult:Item(i)
ALTD()
cName := UPPER( oWhat:interfaceName() )
IF cName = "PUSHPIN"
...
ELSEIF cName = "LOCATION"
...
nun hab ich beim suchen folgendes entdeckt
Code: Alles auswählen
// try to find the Country, State, County
FindResults findResults =
MP.ActiveMap.ObjectsFromPoint(MP.ActiveMap.LocationToX(loc), MP.ActiveMap.LocationToY(loc));
try
{
// known problem with MapPoint -- iterator may throw exception at end
foreach (object o in findResults)
{
MapPoint.Location locR = o as MapPoint.Location;
if ( locR == null ) continue;
MapPoint.GeoShowDataBy locType = locR.Type;
switch ( locR.Type )
{
case GeoShowDataBy.geoShowByCountry:
this.Country = locR.Name;
break;
case GeoShowDataBy.geoShowByRegion1:
this.State = locR.Name;
break;
case GeoShowDataBy.geoShowByRegion2:
this.County = locR.Name;
break;
case GeoShowDataBy.geoShowByCity:
break;
}
}
}
catch (Exception) // ignore exception
{ }
was ich noch nicht ganz verstehe : ObjectsFromPoint() soll mir ja ein FindResult Auflistung geben
welche Location und Pushpin sein können ... und sonst noch was ?
mit :NearBy bekomme nun ebenfalls eine FindResult Auflistung welche PlaceCategory Objekt hat.
Wenn ich vorher alle Places manuelle in der Original Version "deselektiert" habe dann erscheinen
nur noch "Meine Pins". wie kann ich das "deselektieren" per activeX machen ?