Opened 10 years ago

Last modified 10 years ago

#627 new defect

KML downloaded from Redline contains empty Placemark element

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

Description

If the stylization type of Redline widget is not set, or is set to Advanced Stylization, the KML file downloaded would contain some empty Placemark element.

Attachments (1)

RedlineLayer.kml (637 bytes ) - added by zhanga 10 years ago.

Download all attachments as: .zip

Change History (4)

by zhanga, 10 years ago

Attachment: RedlineLayer.kml added

comment:1 by jng, 10 years ago

MgKmlService::GetFeaturesKml doesn't handle Layer Definitions using Advanced Stylization does it?

If that's the case, the only real practical solution is to hide/disable the KML/KMZ export options if we're trying to export such a layer.

comment:2 by zhanga, 10 years ago

MgKmlService::GetFeaturesKml() uses StylizationEngine::StylizeVectorLayer() which calls method Stylize() for each style. In KmlRenderer::StartFeature, it will add "<Placemark>".
I think we can utilize the parameter initialPass, which is not used in KmlRenderer now. If initialPass is true, we add "<Placemark>", otherwise not.

comment:3 by jng, 10 years ago

Ok I stand corrected once again, I just drew some redlines with Advanced Stylization and exported it out to KML and got more points/polygons/lines than expected. Maybe it is the initialPass parameter you are talking about.

Note: See TracTickets for help on using tickets.