Opened 3 years ago

Closed 3 years ago

#626 closed defect (fixed)

KML/KMZ download from redline is useless when map CS is WGS84.PseudoMercator

Reported by: zhanga Owned by: madair
Priority: P3 Milestone: 2.3
Component: Widgets Version: 2.2 - RC1
Severity: Minor Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

In a Flexible Layout in any browser that uses WGS84.PseudoMercator? as the Map CS:

  1. Draw a redline (try SDF > Line String), and download a KML or KMZ of the redline.
  2. Drop the KML or KMZ file into Google Earth.

Result: Nothing happens.

Attachments (2)

RedlineLayer.sdf (350.0 KB) - added by jng 3 years ago.
Problematic redline data store (SDF)
markupmanager.php.patch (1.4 KB) - added by jng 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 years ago by jng

I think this is a bug in 2 areas:

  1. MapGuide's KML renderer.
  2. The default redline style settings for lines.

The line string geometry is there, but the style generated for it uses line width of 0 (assuming no changes from the default redline style), causing nothing to be drawn.

The default style uses a 0 line thickness. The default image-based renderers in MapGuide seem to clamp 0 line thickness to some very small value > 0 (which is why we still see such lines being rendered), but the KML renderer does not and writes the thickness value as-is.

Workaround is to specify a non-zero line thickness as a default, proper fix is to make the KML renderer follow the same behaviour as the image-based renderers for dealing with 0 line thickness.

Changed 3 years ago by jng

Attachment: RedlineLayer.sdf added

Problematic redline data store (SDF)

comment:2 Changed 3 years ago by jng

I stand corrected, I just drew some redlines and KML export produced a blank KML file on export. The offending data store has been attached.

Changed 3 years ago by jng

Attachment: markupmanager.php.patch added

comment:3 Changed 3 years ago by jng

Hi Andy, could you try the attached patch to see if it fixes the issue?

comment:4 Changed 3 years ago by zhanga

Hi Jackie, thank you very much for the fix. The patch works well in my test. One more thing: the DownloadMarkupAsKml? is using the deprecated open method of MgMap?:

        $map = new MgMap();
        $map->Open($resourceService, $this->args['MAPNAME']);

Could you please update it to

        $map = new MgMap($this->site);
        $map->Open($this->args['MAPNAME']);

Thank you!

comment:5 Changed 3 years ago by jng

Resolution: fixed
Status: newclosed

Fixed trunk (r2877) and 2.6 (r2878)

Note: See TracTickets for help on using tickets.