Einzelnen Beitrag anzeigen

Thom

Registriert seit: 19. Mai 2006
570 Beiträge
 
Delphi XE3 Professional
 
#160

AW: Google Maps über COM (Component Object Model)

  Alt 22. Dez 2011, 12:44
Do you mean in the center of the displayed map? Or you just want to determine whether the marker is visible?
You can instead use the TLatLngBounds object:
  • TLatLngBounds.Center returns the center of the rectangle
  • TLatLngBounds.Contains(LatLng: TLatLng) returns true if the given value is in this bounds.
With the map can be do it like this:
Delphi-Quellcode:
  if Map.Bounds.Contains(Marker.Position) then
  begin
    //-> Marker is visible
  end;
Thomas Nitzschke
Google Maps mit Delphi
  Mit Zitat antworten Zitat