var vectormap = new OpenLayers.Layer.Vector('Overlay',
{
styleMap: new OpenLayers.StyleMap(
{
"default": new OpenLayers.Style({
externalGraphic: 'girl.png',
graphicWidth: 50,
graphicHeight: 50,
graphicYOffset: -24,
title: 'marker'}),
"select": new OpenLayers.Style({
externalGraphic: 'boy.png',
graphicWidth: 16,
graphicHeight: 26,
graphicYOffset: -24,
title: 'marker_select'})
})
});
featurearray = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(113.950,33.019));
vectormap.addFeatures([ featurearray ]);
This is my vector layer, but a bit wrong, my png image title attribute can not be displayed when the mouse to move up, I checked the official website the "OSM with Marker and Popup.html" code, exactly the same, you know why, thank you!
