Problems getting maps pointers to show, with CGGoogleMaps2

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Problems getting maps pointers to show, with CGGoogleMaps2

Post by naturelab »

Screen Shot 2016-03-29 at 15.45.06.png
First time usage of CGGoogleMaps2 today.

Has been pretty frustrating. Several issues...

1) I cannot get any pointers to show on the map AT ALL.
a) I have set up two map pointers using the 'add map pointers' section of the admin modue.
b) I have tried to add points dynamically using :-

Code: Select all

{CGGoogleMaps2}
{cggm2_add_dynpoint map=1 name='point1'  lat='50.43102 ' long='-3.7076' tooltip='test' icon='food'}
But this does not work for me either.

I am including the jquery in the <Head> of the document :-

Code: Select all

<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></__script>
<__script__ type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></__script>
<__script__ type="text/javascript" src="//maps.google.com/maps/api/js?libraries=geometry&sensor=true"></__script>
<__script__ type="text/javascript" src="/dev/modules/CGGoogleMaps2/lib/js/infobox_packed.js"></__script>
<__script__ type="text/javascript" src="/dev/modules/CGGoogleMaps2/lib/js/map_tooltip.js"></__script>
<__script__ type="text/javascript" src="/dev/modules/CGGoogleMaps2/lib/js/jquery.cggm_map.js"></__script>
<__script__ type="text/javascript" src="/dev/uploads/mysite/js/bootstrap.min.js"></__script>
<__script__ type="text/javascript" src="/dev/uploads/mysite/js/plugins.js"></__script>
<__script__ type="text/javascript" src="/dev/uploads/mysite/js/classie.js"></__script>
<__script__ type="text/javascript" src="/dev/uploads/mysite/js/jquery.themepunch.tools.min.js"></__script>
<__script__ type="text/javascript" src="/dev/uploads/mysite/js/scripts.js"></__script>

And this is the default map template that I have been using :-

Code: Select all

{* map template *}
{* inline css styles are just for example purposes *}
<style type="text/css">
.infoBox {
  padding: 0.5em;
  border: 1px solid-black;
  background-color: yellow;
}
.m_tooltip {
  padding: 0.5em;
  border: 1px solid-black;
  border-radius: 3px;
  background-color: white;
}
</style>

{* this is where the map will be displayed *}
<div id="cggm_map_{$mapinstance}" style="height: 500px; width: 2000px;">
</div>
<div class="cggm2_markers"></div>

<__script__ type="text/javascript">
if( typeof(jQuery) == 'undefined' ) {
  var div = document.getElementById('cggm_map_{$mapinstance}').
  div.innerHTML = '<h3 style="color: red;">jQuery and jQuery UI Are Required</h3>';
  throw new Error('jQuery and jQuery UI Are Required');
}
$(document).ready(function(){
  var obj = $('#cggm_map_{$mapinstance}');
  obj.cggm2({$generator->get_map_options_js()});
  {if $map->directions && isset($directions_form_id)}$obj.cggm2('options','directions_form','#{$directions_form_id}');{/if}
});
</__script>
I have also noticed that the path to the icons is broken in the admin panel ( see screenshot ) - I can't find anywhere to change this.

If anyone can see anything obvious, I would appreciate a nudge in the right direction.

On a positive note, I have been able to include a KML file dynamically using...

Code: Select all

 {cggm2_add_kml}
My details...

Code: Select all

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

Cms Version: 2.1.2

Installed Modules:

    AdminSearch: 1.0
    CGBlog: 1.13.3
    CGContentUtils: 2.1
    CGExtensions: 1.52.2
    CGGoogleMaps2: 0.99.3
    CGSimpleSmarty: 2.0.5
    CGSnapshot: 1.0
    CGStaticMaps: 1.0.0
    CMSContentManager: 1.1
    DesignManager: 1.1.1
    FileManager: 1.5.2
    FormBuilder: 0.8.1.3
    Gallery: 2.1.3
    JQueryTools: 1.3.8
    MicroTiny: 2.0.3
    ModuleManager: 2.0.2
    Navigator: 1.0.2
    News: 2.50.4
    Search: 1.50.2
    SimpleSiteInfo: 3.1
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Problems getting maps pointers to show, with CGGoogleMap

Post by calguy1000 »

I just tested CGGM2 with a boostrap template I am using.

Had absolutely no issues with dynamic points or points created statically in the database.

I'd check your javascript console.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: Problems getting maps pointers to show, with CGGoogleMap

Post by naturelab »

Thanks for checking Robert. I'll have another look.
Do you get the broken icon in the admin panel BTW ?
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: Problems getting maps pointers to show, with CGGoogleMap

Post by naturelab »

I don't need an API key do I ?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Problems getting maps pointers to show, with CGGoogleMap

Post by calguy1000 »

No, you do not need an API key.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

[SOLVED] Problems getting maps pointers to show CGGoogleMap

Post by naturelab »

Robert:-

I tried it on a fresh install / minimal template and it seems to work ok.
I must have a Jquery conflict somewhere on the other site.

Thanks

( Trivial, but the Pointer Icons are stillbroken in the admin - FYI )
Post Reply

Return to “The Lounge”