the problem in my thematic map System

24 views
Skip to first unread message

Chunjing Han

unread,
Jan 6, 2009, 4:35:53 AM1/6/09
to thematic-mapping-engine, chjhan
Hi,all
I´m trying to implement the fantastic TME in my localhost, windows xp apache v2 and mysql, and php, everything looks fine.
But I meet some trouble.
Firstly,I use the http://localhost/thematicmapping/tme/ and can get the select form page.When i submit the selected items, I can't get the information on the google Earth. like the pic1 in the attachment.
Secondly,I use the example program to test and use http://localhost/thematicmapping/tme/TME_Example.php ,I can get
the kmz file link.after i click the link and open the kmz file.I find the error log from google Earth.please check pic2.But to my surprise I can find the Polygon on the Google earth.
Thirdly, For finding the reason about the second step, I add the debug sentence in the TME_engine.php.like the following
-----------------------------------------------------------------------------------------------------------
..........
.........
$kml .= " </Document>" . PHP_EOL
. "</kml>" . PHP_EOL;
echo($kml);
............
............

I excuted the http://localhost/thematicmapping/tme/TME_Example.php again after adding the echo sentences, then I got the content of kmz on the webpage.
the content of kmz file is enclosed the attachment kmz.xml

The problem is where is the reason of the error message when I open the kmz file?
How to solove this problem?




--------------
Chunjing Han
2009-01-06
pic2.bmp
pic1.bmp
kmz.xml

thematicmapping.org

unread,
Jan 6, 2009, 10:01:48 AM1/6/09
to Thematic Mapping Engine
Hi,

Are you sure that you're accessing the generated KMZ file through
localhost and not from your local hard drive? See this thread:
http://groups.google.com/group/thematic-mapping-engine/browse_thread/thread/8421338541ebc7d0?hl=en

Bjørn



On Jan 6, 10:35 am, "Chunjing Han" <chj...@cstnet.cn> wrote:
> Hi,all
> I´m trying  to implement the fantastic TME in my localhost, windows xp apache v2 and mysql, and php, everything looks fine.
> But I meet some trouble.
> Firstly,I use thehttp://localhost/thematicmapping/tme/and can get the select form page.When i submit the selected items, I can't get the information on the google Earth. like the pic1 in the attachment.
> Secondly,I use the example program to test and usehttp://localhost/thematicmapping/tme/TME_Example.php,I can get
> the kmz file link.after i click the link and open the kmz file.I find the error log from google Earth.please check pic2.But to my surprise I can find the Polygon on the Google earth.
> Thirdly, For finding the reason about the second step, I add the debug sentence in the TME_engine.php.like the following
> -----------------------------------------------------------------------------------------------------------
> ..........
> .........
> $kml .= "  </Document>" . PHP_EOL
>               . "</kml>" . PHP_EOL;
>         echo($kml);
> ............
> ............
>
> I excuted the  http://localhost/thematicmapping/tme/TME_Example.phpagain after adding the echo sentences, then I got the content of kmz on the webpage.
> the content of kmz file is enclosed the attachment kmz.xml
>
> The problem is where is the reason of the error message when I open the kmz file?
> How to solove this problem?
>
> --------------
> Chunjing Han
> 2009-01-06
>
>  pic2.bmp
> 2217KViewDownload
>
>  pic1.bmp
> 1987KViewDownload
>
>  kmz.xml
> 329KViewDownload

Chunjing Han

unread,
Jan 6, 2009, 11:53:25 PM1/6/09
to thematic-mapping-engine
Hi
After your suggestions,I find I actually open the kmz file by Google Earth software or by the IE that is installed the google earth plugin tool. That is, I just open the kmz file from my local hard drive. To find the root reason:
1,Firstly, I unintalled the Google earth software in my server.As expected, I can't open the kmz file in the /tmp/ folder.
2,Secondly, I check the TME_ExtForm.js file.I find I have modified the baseURL. In my TME_ExtForm.js file.
TME.google = {
earth: null, // Google Earth instance
baseURL: 'http://localhost/thematicmapping/tme/', // Local URL
networkLink: null // Link to KMZ file
}

--------------------------------------------------------------------------------------------------------------------
3,For find the reason,I modify the kmlfile link as the following:
var kmzlink ="http://kml-samples.googlecode.com/svn/trunk/kml/NetworkLink/placemark.kml";
excute the url:
http://localhost/thematicmapping/tme/
I can get the correct preview on the webpage ,like pic3. it is right.
But use the former sentence:
the var kmzlink = TME.google.baseURL + action.result.file;
I just get the result like pic4
I again click the button of "download" and download the kmz file. But I can't unzip it. If I use the Google eaarth software ,I can open it but meet the error as the former mail i wrote.
So I think maybe the problem is in the process of creating the kmz file.not the google earth.
What do you think about that ?


------------------
Chunjing Han
2009-01-07

-------------------------------------------------------------
发件人:thematicmapping.org
发送日期:2009-01-06 23:02:41
收件人:Thematic Mapping Engine
抄送:
主题:Re: the problem in my thematic map System


Hi,

Are you sure that you're accessing the generated KMZ file through
localhost and not from your local hard drive? See this thread:
http://groups.google.com/group/thematic-mapping-engine/browse_thread/thread/8421338541ebc7d0?hl=en

Bj鴕n



On Jan 6, 10:35燼m, "Chunjing Han" <chj...@cstnet.cn> wrote:
> Hi,all
> I磎 trying 爐o implement the fantastic TME in my localhost, windows xp apache v2 and mysql, and php, everything looks fine.
> But I meet some trouble.
> Firstly,I use thehttp://localhost/thematicmapping/tme/and can get the select form page.When i submit the selected items, I can't get the information on the google Earth. like the pic1 in the attachment.
> Secondly,I use the example program to test and usehttp://localhost/thematicmapping/tme/TME_Example.php,I can get
> the kmz file link.after i click the link and open the kmz file.I find the error log from google Earth.please check pic2.But to my surprise I can find the Polygon on the Google earth.
> Thirdly, For finding the reason about the second step, I add the debug sentence in the TME_engine.php.like the following
> -----------------------------------------------------------------------------------------------------------
> ..........
> .........
> $kml .= " ?/Document>" . PHP_EOL
> ???????. "</kml>" . PHP_EOL;
> ????echo($kml);
> ............
> ............
>
> I excuted the 爃ttp://localhost/thematicmapping/tme/TME_Example.phpagain after adding the echo sentences, then I got the content of kmz on the webpage.
> the content of kmz file is enclosed the attachment kmz.xml
>
> The problem is where is the reason of the error message when I open the kmz file?
> How to solove this problem?
>
> --------------
> Chunjing Han
> 2009-01-06
>
> 爌ic2.bmp
> 2217KViewDownload
>
> 爌ic1.bmp
> 1987KViewDownload
>
> 爇mz.xml
> 329KViewDownload



pic4.JPG
pic3.JPG
tme1231298572.kmz

bj...@thematicmapping.org

unread,
Jan 7, 2009, 12:02:55 PM1/7/09
to thematic-ma...@googlegroups.com

Strange. I downloaded your KMZ file and got the error messages shown
in the attached image when unzipping. I still managed to uinzip the
files using 7-Zip.

I've attached the doc.kml file from your KMZ file. As you can see, the
KML file only contains part of the KML code needed. There seems to be
an error occurring when generating the KML for each country.

Bjorn

kmz_errors.png
doc.kml
Reply all
Reply to author
Forward
0 new messages