API Reference

Geo.getMediaFromArea

This function returns media for a square area defined by the $northEast and $southWest tips of the square.

Syntax

mixed geo.getMediaFromArea ( int vhost, array northEast, array southWest, int moderationStatus = false )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost of the application.
northEastarrayRequirednoneThe north-east (upper-right) point of the square that defines the area for the media. Along with $southWest, is provides the co-ordinates for the area that is to show the users. Examle: $northEast[0] => 62.865220228976895, $northEast[1] => -52.44921875
southWestarrayRequirednoneThe south-west (lower-left) point of the square that defines the area for the media. Along with $northEast, is provides the co-ordinates for the area that is to show the users. Examle: $southWest[0] => 35.08404808848904, $southWest[1] => -131.55078125
moderationStatusintOptionalfalseThe moderationstatus of the media to be displayed. Possible values: 0 (unmoderated), 1 (accepted/approved), 2 (denied), 3 (notdenied), -1 (all)

Response

Below are the fields available in the returned array.

NameTypeDescription
filetypeINTThe filetype of the media: 1 = image, 2 = video, 3 = audio, 4 = text.
hitsINTThe number of views for the media.
titleSTRINGThe media title.
geo_latitudeFLOATThe event's geographical latitude. i.e.: 40.775729609144044
geo_longitudeFLOATThe event's geographical longitude. i.e.: -84.44921875
thumbUrlSTRINGThe address of the event.

Sample Response

Code examples

0 comments

Be the first to comment on getMediaFromArea.

Add a Comment

  • captcha