G'day all,I am having a problem with the position of boxes on the screen being offset from their (supposed) location and the reported MousePosition(). This does matter because at some zoom scales you actually need to click to the North-West (so to speak) of the box to get the feature info returned.
The attached pictures show the (apparent) centre of the box, and the mouse hovering over it.
<<inline: offset_2.png>>
I'm sure this is something simple, but I have a number of polygons in a postgis table (EPSG:4326). In fact, I would rather use just x and y, but the original data was all in both positive and negative points.
I should also admit that I am setting the extent rather larger than a normal 'earth' range ( map.maxExtent = new OpenLayers.Bounds(-500,-300,500,300);)
The polygons are all contrived (rectangles centred on a user defined point - I'm moving boxes around the screen) and are 15px x 10px.
I have a MapServer mapfile (with map and layer projects objects epsg: 4326 and "wms_srs" "4326" in the layer metadata
I also have openlayers layers that look like this : var shortedges = new OpenLayers.Layer.WMS( 'Short Edges', wmsserver + '?map=' + mapfile + '&',{transparent: 'true', layers: 'shortedges', GRAPHID: graphid, isBaseLayer: 'true', version: '1.1.1', srs: 'EPSG:4326'},
{singleTile: true'} ); shortedges.isBaseLayer = true; shortedges.visibility = true; map.addLayer(shortedges);The only reference I could find suggested that I add a text-align: left to the map css definition. Didn't make a whole lot of sense, I have done it, and it didn't work.
I hope someone can point me in the right direction here. cheers Ben -- Ben Madin AusVet Animal Health Services P.O. Box 5467 Broome WA 6725 Australia t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 e : b...@ausvet.com.au AusVet's website: http://www.ausvet.com.auThis transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this email are the opinion of the writer only and are not endorsed by AusVet Animal Health Services unless expressly stated otherwise. Although AusVet uses virus scanning software we do not accept liability for viruses or similar in any attachments.
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users