Page 1 of 1

Can't get a map to show using CGGoogleMaps2

Posted: Fri Jul 25, 2014 3:24 pm
by wmdvanzyl
I can't get a map to display using CGGoogleMaps2. Page is just empty. What can i provide to help you help me?

Code: Select all

----------------------------------------------

Cms Version: [b]1.11.10[/b]

Installed Modules:

    CMSMailer: [b]5.2.2[/b]
    CMSPrinting: [b]1.0.5[/b]
    FileManager: [b]1.4.4[/b]
    MenuManager: [b]1.8.6[/b]
    MicroTiny: [b]1.2.6[/b]
    ModuleManager: [b]1.5.5[/b]
    News: [b]2.14.2[/b]
    Search: [b]1.7.11[/b]
    ThemeManager: [b]1.1.8[/b]
    AceEditor: [b]1.0[/b]
    TinyMCE: [b]2.9.12[/b]
    Gallery: [b]1.6.1[/b]
    FormBuilder: [b]0.7.3[/b]
    CGExtensions: [b]1.39[/b]
    CGSmartImage: [b]1.16.2[/b]
    CGSimpleSmarty: [b]1.7.3[/b]
    CGGoogleMaps2: [b]0.98.5[/b]


Config Information:

    php_memory_limit: [b][/b]
    process_whole_template: [b][/b]
    max_upload_size: [b]20000000[/b]
    url_rewriting: [b]mod_rewrite[/b]
    page_extension: [b][/b]
    query_var: [b]page[/b]
    image_manipulation_prog: [b]GD[/b]
    auto_alias_content: [b]true[/b]
    locale: [b][/b]
    default_encoding: [b]utf-8[/b]
    admin_encoding: [b]utf-8[/b]
    set_names: [b]true[/b]


Php Information:

    phpversion: [b]5.3.23[/b]
    md5_function: [b]On[/b] (True)
    gd_version: [b]2[/b]
    tempnam_function: [b]On[/b] (True)
    magic_quotes_runtime: [b]Off[/b] (False)
    E_STRICT: [b]0[/b]
    E_DEPRECATED: [b]8192[/b]
    memory_limit: [b]32M[/b]
    max_execution_time: [b]30[/b]
    output_buffering: [b]On[/b]
    safe_mode: [b]Off[/b] (False)
    file_uploads: [b]On[/b] (True)
    post_max_size: [b]20M[/b]
    upload_max_filesize: [b]20M[/b]
    session_save_path: [b]/tmp[/b] (1777)
    session_use_cookies: [b]On[/b] (True)
    xml_function: [b]On[/b] (True)
    xmlreader_class: [b]On[/b] (True)


Server Information:

    Server Api: [b]cgi-fcgi[/b]
    Server Db Type: [b]MySQL (mysqli)[/b]
    Server Db Version: [b]5.1.73[/b]
    Server Db Grants: [b]Found a "GRANT ALL" statement that appears to be suitable[/b]
    Server Time Diff: [b]No filesystem time difference found[/b]


----------------------------------------------

Re: Can't get a map to show using CGGoogleMaps2

Posted: Fri Jul 25, 2014 3:39 pm
by calguy1000
CGGoogleMaps2 has been extensively tested, and does work. But for a map to show up you need at least one point/marker.

You can define static markers for a map using the CGGoogleMaps2 admin panel (there's a marker icon on each map row in the first tab of the admin panel).

You can also define markers dynamically (before you call the map) using {cggm2_add_dynpoint}

i.e:

Code: Select all

{cggm2_add_dynpoint name='Toronto'  address='Toronto Canada'}
{CGGoogleMaps2}

Re: Can't get a map to show using CGGoogleMaps2

Posted: Fri Jul 25, 2014 4:12 pm
by wmdvanzyl
Oh i don't doubt for a second that it works. Your modules are excellent!

It's just that i am not receiving any errors and no map. I have defined a point - even tried the demo point you give in the example.

I have turned off the Site Down message:

This is where i am testing the map: http://renaultpaarl.modh.co.za/finance

and the map i want to show is located at http://renaultpaarl.modh.co.za/contact <- BUT this is currently just using an iframe.

The steps i have followed are:

Code: Select all

Create a map. 

Mark one of your maps as default, by clicking on the red 'X' beside a particular map. This is useful if you do not specify the 'map' parameter on the tag.

Adjust either your CSS, or the map. (??? haven't done this)

In the page, or page template that will be utilizing the map be sure to enable jQuery, and the jQuery UI. One convenient way to do this is with the {cms_jquery} plugin provided with CMSMS.
Add the {CGGoogleMaps2} tag inside the content block of a page, or inside a page template.
Also, viewing the page source, FF complains about this line and the use of &:

Code: Select all

<__script__ src="http://maps.google.com/maps/api/js?libraries=geometry&sensor=true"></__script>

Re: Can't get a map to show using CGGoogleMaps2

Posted: Fri Jul 25, 2014 5:23 pm
by calguy1000
You have a javascript error on your site (it's clearly visible in the javascript console) caused by an unescaped ' in the description of your point.

I've fixed that problem in the upcoming release.

Re: Can't get a map to show using CGGoogleMaps2

Posted: Fri Jul 25, 2014 6:21 pm
by wmdvanzyl
Ughh... i see it in the description... copy and paste error - nice.

Thx for the help!