Google Earth and eZ publish

Author Message

Bjørn Sandvik

Tuesday 06 February 2007 9:45:14 am

I've used eZ publish to generate KML files for Google Earth. To achive this I've made a new pagelayout (kml_pagelayout.kml) and some template overrides (kml_view.country.tpl etc).

You'll find an example on:
http://www.globalis.no/land/afghanistan

Click on the link "Vis land på Google Earth"

This is working with Firefox but Internet Explorer gives an error:
"Could not open file..."

This is a known error and is not directly connected to eZ publish:
http://bbs.keyhole.com/ubb/showflat.php?Cat=0&Number=665657&page=2&fpart=all&vc=1

I've tried different solutions but it's still not working.

Does anyone have a solution???

http://blog.thematicmapping.org
http://www.globalis.no

Kristof Coomans

Tuesday 06 February 2007 11:52:15 pm

Hi Bjørn

This has probably something to do with cache control.

I've encountered the problem before with other types of files and I used the following HTTP headers to solve it:

Expires: 0
Cache-Control: private
Content-type: application/x-Research-Info-Systems
Content-Disposition: attachment; filename="export.ris"

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Bjørn Sandvik

Wednesday 07 February 2007 1:17:52 am

Thanks for your reply.

Is it possible to set these HTTP headers without changing the kernel files of eZ publish?

http://blog.thematicmapping.org
http://www.globalis.no

Kristof Coomans

Wednesday 07 February 2007 2:06:29 am

Yes, you can: http://ezpedia.org/wiki/en/ez/headers

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Bjørn Sandvik

Wednesday 07 February 2007 9:34:31 am

SOLVED!

I had to add these lines to site.ini.append.php:

[HTTPHeaderSettings]
CustomHeader=enabled
HeaderList[]=Cache-Control
Cache-Control[]
Cache-Control[/layout/set/kml]=private

It is now working in both Internet Explorer and Firefox

Thanks for your help.

http://blog.thematicmapping.org
http://www.globalis.no

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:38:48
Script start
Timing: Jan 18 2025 11:38:48
Module start 'layout'
Timing: Jan 18 2025 11:38:48
Module start 'content'
Timing: Jan 18 2025 11:38:49
Module end 'content'
Timing: Jan 18 2025 11:38:49
Script end

Main resources:

Total runtime0.8586 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 589.0469152.6250
Module start 'layout' 0.00860.0032 741.671939.4453
Module start 'content' 0.01170.8436 781.1172567.8516
Module end 'content' 0.85530.0033 1,348.968816.1641
Script end 0.8586  1,365.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5150160.0003
Check MTime0.00150.1715160.0001
Mysql Total
Database connection0.00170.194410.0017
Mysqli_queries0.765789.1731630.0122
Looping result0.00150.1753610.0000
Template Total0.814394.820.4071
Template load0.00240.284120.0012
Template processing0.811894.547720.4059
Template load and register function0.00020.024710.0002
states
state_id_array0.00240.274010.0024
state_identifier_array0.00190.217320.0009
Override
Cache load0.00200.2315410.0000
Sytem overhead
Fetch class attribute can translate value0.00230.273320.0012
Fetch class attribute name0.00350.410670.0005
XML
Image XML parsing0.00170.192420.0008
class_abstraction
Instantiating content class attribute0.00000.0029100.0000
General
dbfile0.00090.1030220.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs