Opened 16 years ago

Closed 16 years ago

#2 closed defect (fixed)

[Fusion] Cursor Position widget appears to be reporting incorrect location

Reported by: jfournier Owned by: madair
Priority: P1 Milestone: 1.0.5
Component: Widgets Version: 1.0.2
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

I added a custom marker to the map in the MapGuide standard sample template (using Sheboygan) and it appeared in the incorrect location. The cursor position widget reports LON: -88.34 and LAT: 44.03 as the position whereas the code states the LON is -87.74 and LAT is 43.74. I'm not entirely sure where the error lies.

Code to reproduce (place in fusionInitialize):

var myolmap = Fusion.getWidgetById('Map').oMapOL; var markers = new OpenLayers.Layer.Markers( "Markers" ); myolmap.addLayer(markers);

var markerSize = new OpenLayers.Size(21,25); var markerOffset = new OpenLayers.Pixel(-(markerSize.w/2), -markerSize.h); var markerIcon = new OpenLayers.Icon('images/marker-blue.png',markerSize,markerOffset);

var marker = new OpenLayers.Marker(new OpenLayers.LonLat(-87.74, 43.74),markerIcon); markers.addMarker(marker);

You'll need to modify the image path to suit your own marker.

Change History (11)

comment:1 by madair, 16 years ago

Priority: P2P1
Status: newassigned

comment:2 by madair, 16 years ago

test point on Sheboygan is district 8 - intersection of N 3rd St & Parks street

should be (x: -87.704540 y:43.765598)

From email by Zspitzer

comment:3 by madair, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [1388]) closes #2: add methods to get and set the MeterPerUnit value as returned by LoadMap (rather than using hard-coded values for meters per degree)

comment:4 by madair, 16 years ago

Milestone: 1.11.0.5

comment:5 by zspitzer, 16 years ago

Resolution: fixed
Status: closedreopened

I just installed the 1.0.5 and copied across the mapguide templates and the cursor position is still wrong

comment:6 by zspitzer, 16 years ago

It works in IE :) but not in Firefox,

but in IE I get an error message Fusion Error: Warning meters per unit already set

comment:7 by madair, 16 years ago

The warning is being issued correctly I believe (it happens when the OverviewMap tries to set the metersPerUnit value. I can suppress the error being issued if the value is the same as teh value already set.

Part of the issue is that some of the templates define an error callback that issues an alert. Those should probably be changed so that only real errors (not warnings) are alerted.

comment:8 by madair, 16 years ago

(In [1401]) re #2: only issue a warning if the metersPerUnit value differs from what was previously set

comment:9 by madair, 16 years ago

(In [1402]) re #2: only issue a warning if the metersPerUnit value differs from what was previously set

comment:10 by zspitzer, 16 years ago

I have just tested the 1.0.6 release and this is now working correctly in both FF2 and IE7

comment:11 by madair, 16 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.