Composant Delphi / Google Maps / OpenStreetMap / Leaflet  / Mappilary / Native Maps 100% Delphi 0% WebBrowser 0% Javascript


you are here :TECMap

Property type PanoramioView TECMapPanoramioLayer lets you view images from Panoramio

It is available only with Google Maps but an emulation is possible.

Fig. 54 Enabling view Panoramio
Fig. 54 Enabling view Panoramio

// Delphi map component ECMap

// show panoramio layer
map.PanoramioView.visible := true;


This class has properties

property Clickable : boolean;

Property read / written or not making clickable images

Raises the event OnPanoramioLayerClick

property SuppressInfoWindows : boolean;
Property read / written or not allowing the display of the InfoWindow associated thumbnail image
property Tag : string;
Property read / written that allows filtering by keyword
property UserId : string;
Property read / written that allows filtering by UserId, identifying Panoramio poster's images.
property Visible : boolean;
Property read / written to display or not to panoramio
property ToTxt : string;
Property read / write access to PanoramioView which gives the form of a text string
procedure Search;
Launches a search for images in a rectangular area of coordinates LatSW, LngSW, LatNE, LngNE
procedure SearchAt(const Lat,Lng,Radius:double);
Launches search for images in a rectangular area centred on the Lat, Lng coordinates and with a Radius in Km

The image search function is available under CloudMade and Google Maps


Research is not blocking, the OnPanoramioSearch event is raised when the results are available.

Each query returns a block of 100 images maximum, to find out if other images are available you must test the HasMore property and boost research by NextSearch, the right place to do so is in the OnPanoramioSearch event.

procedure NextSearch;
Research for the following images, the OnPanoramioSearch event is also raised by this procedure
function IsSearch:boolean;
Indicates whether a search is in progress
function Count:integer;
Returns the number of images found
function HtmlPhoto(const index:integer;size:TECPanoramioImageSize):string;
Returns an html tag IMG to display an image in a specified size (pimMini_square,pimSquare,pimThumbnail,pimSmall,pimMedium ou pimOriginal)
function HtmlCopyright(const index:integer):string;
Returns a html content indicating the copyright of the image
Example of using show the picture in miniature with its title and copyright in an InfoWindows
map.infoWindows[idInfoPanoramio].content :='<h3>'+map.PanoramioView.photo_title[1]+ '</h3>'+map.PanoramioView.HtmlPhoto(1,pimSmall)+ '<h4>Author: '+map.PanoramioView.owner_name[1]+'</h4>'+map.PanoramioView.HtmlCopyright(1);

Fig. 55 Display an InfoWindows with a Panoramio image information

property HasMore:boolean
Indicates if other images are available in the research area

The following properties are associated with the found images

property owner_id[index:integer] : string
property owner_name[index:integer] : string
property photo_date[index:integer] : string
property photo_id[index:integer] : string
property photo_lng[index:integer] : double
property photo_lat[index:integer] : double
property photo_title[index:integer] : string
property photo_file_url[index:integer]: string

The following properties determine the Southwest and the northeast of the area of research point

property LatSW : double
property LngSW : double
property LatNE : double
property LngNE : double


Event triggered by a click on a thumbnail Panoramio

procedure OnPanoramioLayerClick(sender : TObject; const Author,PhotoId,title,Url,UserId,Html:string;const dLatitude,dLongitude : double)

Author author photo

PhotoID Panoramio Photo ID

Title photo title

Url url of the photo

UserId Panoramio poster's ID photo

Html Html content of InfoWindow associated with the photo

dLatitude,dLongitude Latitude and longitude of the photo


Event triggered by an image search this be with SearchAt or NextSearch

procedure OnPanoramioSearch(sender: TObject; const First,Last: Integer);
First and Last indicate the bounds of the images were found, indeed each search can return maximum than 100 images


The DemoLayer program allows you to see how to use Panoramio and other types of layers

Fig. 56 DemoLayer
Fig. 56 DemoLayer
go to page
© 2016 ESCOT-SEP Christophe - Made width Help&Web - RSS - Google+