Skip to content

Instantly share code, notes, and snippets.

@dkobia
Created March 1, 2011 21:35
Show Gist options
  • Save dkobia/849945 to your computer and use it in GitHub Desktop.
Save dkobia/849945 to your computer and use it in GitHub Desktop.
var ci_styles = new OpenLayers.StyleMap({
"default": new OpenLayers.Style({
pointRadius: "10", // sized according to type attribute
fillColor: "${fcolor}",
strokeColor: "${scolor}",
strokeWidth: 2,
graphicZIndex: 1
},
{
context:
{
fcolor: function(feature)
{
},
scolor: function(feature)
{
},
}
}),
"select": new OpenLayers.Style({
fillColor: "#66ccff",
strokeColor: "#3399ff",
graphicZIndex: 2
})
});
var checkinLayer = new OpenLayers.Layer.Vector('Checkins', {styleMap: ci_styles});
map.addLayers([checkinLayer]);
var checkinPoint = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(parseFloat(Lon), parseFloat(Lat)));
checkinLayer.addFeatures([checkinPoint]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment