var v_style = new OpenLayers.StyleMap({
'default': new OpenLayers.Style({
graphicWidth : 60,
graphicHeight: 25,
graphicTitle:"dddd",
fillColor: "#ee9900",
fillOpacity: 0,
hoverFillColor: "#66CCCC",
hoverFillOpacity: 0,
strokeColor: "#ffff00",
strokeOpacity: 0,
strokeWidth: 2,
strokeLinecap: "round",
strokeDashstyle: "solid",
hoverStrokeColor: "red",
hoverStrokeOpacity: 1,
hoverStrokeWidth: 1,
pointRadius: 6,
hoverPointRadius: 1,
hoverPointUnit: "%",
pointerEvents: "visiblePainted",
cursor: "inherit",
fontColor: "#000000",
labelAlign: "cm",
labelOutlineColor: "white",
labelOutlineWidth: 3,
label: ""
}),
'select': new OpenLayers.Style({
fillColor: "#99CCFF",//bule
fillOpacity: 0.8,
hoverFillColor: "white",
hoverFillOpacity: 0.8,
strokeColor: "#ffff00",
strokeOpacity: 1,
strokeWidth: 2,
strokeLinecap: "round",
strokeDashstyle: "solid",
hoverStrokeColor: "red",
hoverStrokeOpacity: 1,
hoverStrokeWidth: 0.3,
pointRadius: 6,
hoverPointRadius: 1,
hoverPointUnit: "%",
pointerEvents: "visiblePainted",
cursor: "pointer",
fontColor: "#000000",
labelAlign: "cm",
labelOutlineColor: "white",
labelOutlineWidth: 3
}),
'hover': new OpenLayers.Style({
fillColor: "#99CCFF",//bule
fillOpacity: 0.3,
hoverFillColor: "white",
hoverFillOpacity: 0.8,
strokeColor: "#ffff00",
strokeOpacity: 1,
strokeWidth: 2,
strokeLinecap: "round",
strokeDashstyle: "solid",
hoverStrokeColor: "red",
hoverStrokeOpacity: 1,
hoverStrokeWidth: 0.3,
pointRadius: 6,
hoverPointRadius: 1,
hoverPointUnit: "%",
pointerEvents: "visiblePainted",
cursor: "pointer",
fontColor: "#000000",
label: "1232123",
graphicWidth : 60,
graphicHeight: 25,
graphicTitle:"dddd",
labelAlign: "cm",
labelOutlineColor: "white",
labelOutlineWidth: 3
})
});
var first = new OpenLayers.Layer.Vector("1", {
protocol: new OpenLayers.Protocol.HTTP({
url: "map.json",
format: new OpenLayers.Format.GeoJSON(),
displayInLayerSwitcher:true,
strategies: [new OpenLayers.Strategy.Fixed()],
styleMap: v_style
})
});var v_style = new OpenLayers.StyleMap({