Opened 8 years ago

Closed 8 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


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 8 years ago.
Problematic redline data store (SDF)
markupmanager.php.patch (1.4 KB ) - added by jng 8 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by jng, 8 years ago

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.

by jng, 8 years ago

Attachment: RedlineLayer.sdf added

Problematic redline data store (SDF)

comment:2 by jng, 8 years ago

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.

by jng, 8 years ago

Attachment: markupmanager.php.patch added

comment:3 by jng, 8 years ago

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

comment:4 by zhanga, 8 years ago

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);

Thank you!

comment:5 by jng, 8 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r2877) and 2.6 (r2878)

Note: See TracTickets for help on using tickets.