Skip to content

Instantly share code, notes, and snippets.

@andrewn
Created October 12, 2009 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewn/208282 to your computer and use it in GitHub Desktop.
Save andrewn/208282 to your computer and use it in GitHub Desktop.
case 'mixed':
// The URL of the Image pinpoint icon is fetched from the 'url'
// property of the Feature
var mixedUrl = (feature.attributes.url) ? feature.attributes.url : '';
var mixedWidth = (feature.attributes.width) ? feature.attributes.width : '';
var mixedHeight = (feature.attributes.height) ? feature.attributes.height : '';
var mixedShadowUrl = (feature.attributes.shadowUrl) ? feature.attributes.shadowUrl : '';
var mixedShadowXOffset = (feature.attributes.shadowXOffset) ? feature.attributes.shadowXOffset : '';
var mixedShadowYOffset = (feature.attributes.shadowYOffset) ? feature.attributes.shadowYOffset : '';
// @TODO - The mixed content type should use a pinpoint specified as an option to the data layer
return new bbc.mtk.OpenLayers.PinPoints.Image(
feature.geometry,
{
title: feature.attributes.title,
text: feature.attributes.description,
url: mixedUrl,
width: parseInt(mixedWidth),
height: parseInt(mixedHeight),
shadowUrl: mixedShadowUrl,
shadowXOffset: parseInt(mixedShadowXOffset),
shadowYOffset: parseInt(mixedShadowYOffset)
}
);
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment