Angular service

service source

Description

Service for querying and displaying panoramio pictures

Methods

featuresReceived (panoramio)

Ajax callback function executed after panoramio API callback

Parameters

NameTypeDescription
panoramio object

List of images, their coordinates and metadata

getSavedItems -> object

Reads the saved features from localStorage and parses that JSON. The functionality of saving is contained in hs.panoramio.panoramio directive

Returns

TypeDescription
object

init

Syntactic sugar for initialization

loadIntoLocalStorage (path)

Loads, serializes and stores an image into localStorage

Parameters

NameTypeDescription
path object

URL of image

loadLocalFeature -> ol.Feature

creates an openlayers feature from json object which was contained in localStorage

Returns

TypeDescription
ol.Feature

update

Requests the most popular images for current extent from Panoramio API. The number of items returned depends on the screen size.