Author
Topic: KML imports but no line work? (Read 4245 times)

I have a KML file that I need to open in MAPub. The file opens fine in Google Earth but when I use the MAPub import I all Iget is an empty Map View (no line work shows up on the art board, no new layers).

Its not the problem I thought it was, since you're using a network link! I wasn't sure if anyone was using that ability of the reader so I'm at least happy to see someone is trying to leverage it wink.gif

I had a big response typed out here to explain why it wasn't working and then I realized what the problem is -- there's a bug where its not reading the html entities correctly. Unfortunately, if you convert them (in this case, &amp; to &) they'll just cause the libkml portion to complain they're not formatted correctly (which is true).

The only good news is that this is already fixed internally. There was a dependency problem with the method I was using to fetch the network'd KML so they switched that part to a different library, and from what I see that one handles the html entities properly. The bad news is I don't see how to fix this with the current build. We only ever tested it with direct links to external KML files since we didn't have a server process anywhere serving up KML files -- so we never tried it with parameters. I'm definitely going to hang on to this file and add it to our test suite!

I know that's probably not super comforting, but for now I guess the MAPublisher KML reader only supports links without html entities in them. Unfortunately, this means pretty much any server-generated KML sad.gif MAPublisher 8.3 should have a fix for this, but I'I don't see a workaround in the interim (other than to download the linked KML file and import it directly).

Hello, Dave! There was a workaround... Please take a look at below:Hi, Dave and everyone. This will work with MAPublisher 8.2 or any earlier version of MAPublisher.

-------Suggested workaround: Obtain the KML data from the original source (see below)

1) Open the KML file in the notepad / text editor2) Use the Find and Replace function. You will have to replace the "amp;" to "&"3) After the find and replace function is performed for all "amp;", select the http link in the file.4) Open an Internet browser and paste the copied HTTP link to the address bar. You will be asked to save or open the file from the link. I saved it on my Desktop.5) When importing the directly downloaded KML file to MAPublisher, you now have the arts imported successfully.

(Please take a look at the screeshot for step 1, 2, 3, adn 5 if it helps )