[18:49:32] euzuro: can you check out markerss.html in the examples directory
[18:50:12] euzuro: specifically the following function (which is activated on cliking the purple div)
[18:50:12] euzuro:
function add() {
var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',new OpenLayers.Size(10,17));
marker = new OpenLayers.Marker(new OpenLayers.LonLat(180,90), icon);
markers.addMarker(marker);
}
[18:50:52] euzuro: basically, it doesnt work correctly if you've moved the map around at all first
[18:51:10] euzuro: which boils down to a problem with: map.getPixelFromLonLat()
[18:51:39] euzuro: the map.getExtent() function returns the bounds for the screen
[18:52:04] euzuro: but if we want to place objects (markers, popups) directly into the map.layersContainerDiv or layer.div
[18:52:23] euzuro: then we need to offset them by how much the map has been moved since the last redraw.
[18:52:28] euzuro: if that makes any sense....
[18:52:41] cr5chmidt: yeah, that makes sense
[18:52:47] cr5chmidt: because the div has moved
[18:52:53] cr5chmidt: and we're positioning them relatively to that
[18:52:58] euzuro: right.
[18:53:10] euzuro: im not quite sure how to approach this.
[18:53:23] euzuro: ie im not sure if it's getExtent
[18:53:27] euzuro: which needs to be changed
[18:53:33] euzuro: or the way we're using it...
[18:53:57] cr5chmidt: no, getExtent is right
[18:54:03] cr5chmidt: it generates the correct bounds even after dragging
[18:54:22] euzuro: right