Skip to content
Social Services Integration for OpenLayers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
img
lib
README.md
demo.html

README.md

Introduction

Olsocial provides OpenLayers.Layer implementations of several Social sites to use it inside OpenLayers easily.

See the DEMO.

Currently supported sites are:

  • Flickr
  • Twitter
  • Lastfm
  • Yelp
  • POIProxy (panoramio, wikipedia, foursquare, and a lot more)

Usage

OpenLayers.Layer.Social.* layers are standard vector layers, so you can set your own symbolizers and functionality.

To load a Twitter layer and display it using a twitter icon:

var layer1 = new OpenLayers.Layer.Social.Twitter("Twitter",{
			styleMap: new OpenLayers.StyleMap({
				externalGraphic: 'img/twitter_fugue.png',
				pointRadius: 8
			})
		});
map.addLayer(layer1);

The complete list of constructors is:

new OpenLayers.Layer.Social.Twitter (layername, parameters);
new OpenLayers.Layer.Social.Flickr  (layername, apiKey, parameters);
new OpenLayers.Layer.Social.Lastfm  (layername, apiKey, parameters);
new OpenLayers.Layer.Social.Yelp    (layername, apiKey, parameters);
new OpenLayers.Layer.Social.POIProxy(layername, POIProxy_Layername, parameters);

Where parameters is the optional object with properties to set on the layers of any OpenLayers.Layer.Vector see OpenLayers documentation

POIProxy

POIProxy is a service to retrieve Points of Interest from any public POI service such as Foursquare, Twitter, Buzz, Panoramio, Wikipedia, Flickr, etc... It provides a common interface to all those services so it's easy to display them in OpenLayers. The complete list of services can be read here POIProxy describeServices.

Popups

In the demo.html file I used my quick and dirty popup manager (SmartPopup.js) to display info balloons, using templates but I strongly recommend you to use the enhaced and brand new OL-FeaturePopups control.

You can’t perform that action at this time.