Opened 15 years ago

Closed 12 years ago

#955 closed defect (fixed)

KML and KMZ mapagent operations broken with Google Earth 5

Reported by: amorsell Owned by:
Priority: high Milestone: 2.4
Component: KML Service Version: 2.0.2
Severity: critical Keywords: kml, kmz, google
Cc: External ID:

Description

The KML and KMZ mapagent operations output is broken with the latest release of Google Earth. There appear to be more than one problem, but 3 items are noted below:

1. Using the following: http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GetMapKml&VERSION=1.0.0&MAPDEFINITION=Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&FORMAT=KML

The KML opens in Google Earth fine and the various network links appear in the Places legend. But, the network links never refresh.

There is a bug in GE 5 where network links do not auto refresh when using onStop viewrefreshmode. Google has acknowledged this bug. To work-around it (for whatever reason this works), the following needs to be in the network link definition:

How it normally would be generated through the mapagent:

<viewRefreshMode>onStop</viewRefreshMode> <viewRefreshTime>1</viewRefreshTime>

How it needs to be generated to work with GE 5:

<refreshMode>onInterval</refreshMode> <refreshinterval>9999</refreshinterval> <viewRefreshMode>onStop</viewRefreshMode> <viewRefreshTime>1</viewRefreshTime>

  1. Trying to open the network links manually in a browser causes the server to not return anything. The following is an example: http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GetLayerKml&VERSION=1.0.0&LAYERDEFINITION=Library://Samples/Sheboygan/Layers/Islands.LayerDefinition&DRAWORDER=3&FORMAT=KML&SESSION=5b7e65aa-0000-1000-8006-0050569412cb_en_7F0000010AFC0AFB0AFA

3. Using the following: http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GetMapKml&VERSION=1.0.0&MAPDEFINITION=Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&FORMAT=KMZ

The KMZ is created and Google Earth opens, but never appears in the GE Places legend so the KMZ is most likely malformed.

All in all, there appears to be multiple problems with MGOS 2.0.2 and Google Earth 5 KML and KMZ. Some of these problems are GE 5 related, and some are MGOS related.

Change History (10)

comment:1 by jbirch, 15 years ago

The first problem is a duplicate of #850 . We could work around it, but the workaround is a hack that doesn't make a lot of sense, and I would prefer to see whether the release version of Google Earth 5 (I've been assured that there will be one this time) addresses this bug.

If you watch those operations in Fiddler (you'll have to use the machine name instead of localhost, or Fiddler won't see them) what shows up (or not) in the first case?

In the second case, if you rename the kmz to zip and extract it, what does the KML file inside of it look like?

comment:2 by jbirch, 15 years ago

Component: Map AgentKML Service

comment:3 by amorsell, 15 years ago

Here's some additional information. Using IIS 6 on Windows 2003 with the .NET web extensions.

Item 3: This appears to only be a problem in Firefox (2 or 3). The KMZ file is returned as mapagent.fcgi. The content type of KMZ is detected correctly and Google Earth opens, but the Places legend is blank and the KMZ never loads. The same thing happens with the FORMAT=KML parameter. Tried setting the mime types for KML and KMZ in IIS on the server-side, rebooted, and no change.

Item 2: Using Fiddler to try to see what is going on. If a manual refresh is done on the network link in GE, the following response is returned: HTTP/1.1 200 OK Date: Sun, 05 Apr 2009 17:32:26 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Status: 200 OK Content-type: application/vnd.google-earth.kmz Content-Length: 747

PK

Copying the network link URL including the valid session ID and pasting that into a browser cause the server to timeout to the request. On the server, no errors occur in the MGOS error log, but errors occur in the Windows Event Viewer.

System error: A process serving application pool 'MGOS' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '956'. The data field contains the error number.

Application error: Faulting application w3wp.exe, version 6.0.3790.3959, faulting module kernel32.dll, version 5.2.3790.4062, fault address 0x0000bee7.

Tried changing the mapguide application in IIS to run in its own application pool and that did not change anything.

comment:4 by jbirch, 15 years ago

Milestone: 2.1

Doesn't look like this is going to make 2.1.0. Removing milestone.

comment:5 by jng, 15 years ago

I tried this with Google Earth 5.1 all KML operations in MapGuide work for me. If this is your case as well, I think this can be closed.

comment:6 by amorsell, 15 years ago

Issue 1 has indeed been fixed by the Google Earth update. However, I'm still seeing the same problems with Issues 2 and 3.

comment:7 by jbirch, 14 years ago

Andy, has this been re-tested against a 2.1 install? I don't imagine much has changed, but... I'd like to update the version of this defect to 2.1 if it's still valid at 2.1.

comment:8 by jng, 12 years ago

Milestone: 2.4

comment:9 by jng, 12 years ago

With 2.4 beta 1 and latest Google Earth:

  1. This is causing MgUnclassifiedExcpetion, must be a stray null pointer deference somewhere in the http handler
  1. KMZ served by MapGuide is appearing under the "Places" menu

comment:10 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Cause of item 2 is due to the GetLayerKml and GetFeaturesKml APIs requiring a bbox parameter passed in. The sample url in this ticket does not include the bbox

This parameter is now checked for in 2.4 (r6838) and trunk (r6839)

Note: See TracTickets for help on using tickets.