Forums / Setup & design / ez gmap location problem

ez gmap location problem

Author Message

Danny C

Friday 23 July 2010 8:45:53 am

Hi

I know this problem is an easy one, or think so anyway. I'm a new'b so go easy.

I'm using the ezgmaplocation extension which i have installed and using the attribute in a class, the map display's in the back end when i enter an address but i can't figure out how to display the map on the website. The solution has to be easy but i'm having some sort of mental block.

Any idea's

Cheers

Peter Keung

Friday 23 July 2010 8:51:02 am

If you've followed the steps from:

http://svn.projects.ez.no/ezgmaplocation/trunk/packages/ezgmaplocation_extension/ezextension/ezgmaplocation/README

The one thing remaining is probably to use something like this in the full view template for the appropriate class:

{attribute_view_gui attribute=$node.data_map.gmap}

... where "gmap" is the identifier of your ezgmaplocation attribute.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Thiago Campos Viana

Saturday 24 July 2010 10:59:39 am

I think he didn't get the api key as in step 4:

4.) Add your GmapsKey to the site.ini under [SiteSettings] like so:
GMapsKey=<Long string of characters from Google>

You need to go to google maps api website ( http://code.google.com/apis/maps/signup.html ) and generate your key, if you has a localhost site, you enter "http://localhost" as your site address, or if it's a network computer, you enter the network computer name: "http://computer2"

So, google will generate your api key, and you will have to change your ini settings.

I think this extension needs some upgrade because version 3 of google maps api doesn't need an api key anymore.

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Danny C

Monday 26 July 2010 5:05:40 am

Hi guys

Thank you for your reply's, I really appreciate it.

I have gotten the map to display and understand how to edit it, etc. which is great. But now i'm trying to override the template's for the map so i can customise it, This is what i've got:

[gmap]
Source=content/datatype/view/ezgmaplocation.tpl 
MatchFile=gmapview.tpl
Subdir=templates
Match[attribute_identifier]=postcode

Not sure how override's work when it come to extensions.

Cheers

Thiago Campos Viana

Monday 26 July 2010 8:20:43 am

"

Hi guys

Thank you for your reply's, I really appreciate it.

I have gotten the map to display and understand how to edit it, etc. which is great. But now i'm trying to override the template's for the map so i can customise it, This is what i've got:

[gmap]
Source=content/datatype/view/ezgmaplocation.tpl 
MatchFile=gmapview.tpl
Subdir=templates
Match[attribute_identifier]=postcode

Not sure how override's work when it come to extensions.

Cheers

"

Is this right?

Match[attribute_identifier]=postcode

The default name of the Geo Article attribute is location, and did you put gmapview.tpl inside some override folder?

For more information you should go to documentation page:

http://ez.no/doc/ez_publish/technical_manual/4_x/templates/the_template_override_system

http://ez.no/doc/ez_publish/technical_manual/4_x/templates/the_template_override_system/template_override_example

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_override_conditions

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Danny C

Monday 26 July 2010 8:54:19 am

Hi

Tried changing the attribute name but no change, and yes the gmapview.tpl is located in my override/templates/ folder

I've also tried the documentation but it's not giving me an answer, hmmm!

Interesting.

Thiago Campos Viana

Monday 26 July 2010 9:12:41 am

ok, in this case you could make a backup of the original tpl file and direct edit it. It's not a good pratice but works.

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Danny C

Monday 26 July 2010 9:28:41 am

hey

Thanks, I'll do this for now until i can find an answer.

Cheers

Thiago Campos Viana

Monday 26 July 2010 9:32:24 am

Hi

I thought again about your problem and it should be an extension priority problem. the template of ez gmap extension has higher priority then your template extension, you could try change the order of the extensions in the settings/override/site.ini.append.php settings.

[ExtensionSettings]
ActiveExtensions[]=yourdesignextension

..

ActiveExtensions[]=ezgmaplocation

..

You could also add the settings to match the class on your override settings and test again:

[gmap]
Source=content/datatype/view/ezgmaplocation.tpl
MatchFile=gmapview.tpl
Subdir=templates
Match[attribute_identifier]=location
Match[class_identifier]=gmap_class_identifier

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Danny C

Tuesday 27 July 2010 2:37:03 am

Hey Thiago

I played around with those files, compied the override code you gave me and changed the names of the attribute and class names to my own and it worked. From there i said i'd do the reverse to see where the problem lay, so i took a part away and reloaded the page and repeated this but could not find the reason, It works with what i had previously.

I have a bad feeling there was a typo in there.

Anyway, it works!

Thanks for all your help

Cheers

eZ debug

Timing: Jan 17 2025 23:44:35
Script start
Timing: Jan 17 2025 23:44:35
Module start 'content'
Timing: Jan 17 2025 23:44:36
Module end 'content'
Timing: Jan 17 2025 23:44:36
Script end

Main resources:

Total runtime0.8721 sec
Peak memory usage4,096.0000 KB
Database Queries218

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.7109180.8359
Module start 'content' 0.00750.7207 768.5469683.8984
Module end 'content' 0.72830.1438 1,452.4453344.4375
Script end 0.8721  1,796.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4682210.0002
Check MTime0.00140.1648210.0001
Mysql Total
Database connection0.00080.093810.0008
Mysqli_queries0.769588.23182180.0035
Looping result0.00280.32462160.0000
Template Total0.845396.920.4226
Template load0.00170.191620.0008
Template processing0.843696.724820.4218
Template load and register function0.00020.022710.0002
states
state_id_array0.00070.078010.0007
state_identifier_array0.00120.137920.0006
Override
Cache load0.00160.1825850.0000
Sytem overhead
Fetch class attribute can translate value0.00160.187940.0004
Fetch class attribute name0.00150.1766120.0001
XML
Image XML parsing0.00140.155840.0003
class_abstraction
Instantiating content class attribute0.00000.0042150.0000
General
dbfile0.00490.5613340.0001
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
21content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
3content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 50
 Number of unique templates used: 10

Time used to render debug report: 0.0002 secs