Created
March 1, 2011 21:35
-
-
Save dkobia/849945 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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