CGGoogleMaps / Google Maps API Topic is solved

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

CGGoogleMaps / Google Maps API

Post by MantaPro »

Just been testing a website updated to CMSMS2.2.16 that was running PHP7.4 which my HostCo end-of-lifes 31/12/22 so been testing it with PHP8 (but only after installing and swapping from various CG modules to instead use SmartForms, CMSMSExt and SMARTYExt) - and the website uses LISE. With PHP8.0 all good but with PHP8.1 LISE breaks - but that is another matter.

To my question - I notice on the Module Forking Project no mention of CGGoogleMaps2 (and that has dependencies on CGSimpleSmarty and CGExtensions) - I presume this comes under the heading of unpopular/better solutions available outside the "CMSMS eco system".

So to the DevTeam and others - what are the main options for embedding GoogleMaps in your CMSMS websites - I presume that I'll swap out to a direct embedding a Google MAPS API - or do you know of a better solution

TIA
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: CGGoogleMaps / Google Maps API

Post by Charles Butcher »

As a non-coder I would love to see a new module that makes it easy to use either Google Maps or preferably OSM. I don't think I'm up to working directly with Google's API.

I've had good success with CGGoogleMaps2 until now, but in my testing it doesn't work with PHP 8.0 and that is going to be a significant obstacle.

As an aside, would moving from CGSimpleSmarty to SmartyExt be a step in the right direction? In other words will SmartyExt work with CGGoogleMaps2?

@MantaPro I'm not following you around, honest!
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1606
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGGoogleMaps / Google Maps API

Post by DIGI3 »

A lot of it depends on your needs, but if you really do want a full replacement to CGGM then you'll likely need to sponsor someone to fork it or build something - it's probably too much work to expect anyone to volunteer to do it.

Personally I've started using LISE along with leaflet.js to do almost everything I was doing in CGGM. It did require getting my hands dirty but I've had some really good results. I can share some samples if you want to hit me up in Slack.
Not getting the answer you need? CMSMS support options
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

Re: CGGoogleMaps / Google Maps API

Post by MantaPro »

Hi Charles Butcher

As Digi3 hints in his later reply - it all depends what you need.

If you just need an entirely static (non interactive, no directions) map then the Google Maps Static Map API is super easy - it is just an image tag where the source of the image is the https call to the google API

If you just need a simple map with a single flag marking your location but it is interactive (zoom in&out, pan, get directions) then this is also super easy using the Google Embedded Maps API, it generates the code for you, you copy and paste it into your website. It works simply via an iframe.

What CGGMs enabled which I used was an interactive map where I had 20+ markers each with custom text in the popup/infowindow. I had worked out for myself to do what Digi3 hints at, to use LISE as the repository for the list of 20+ markers, but embedding the Google Maps Javascript API in to the summary template in LISE requires some Javascript skills - if you needs multiple markers and custom text then LISE is a useful tool but some skills are needed to adapt it.

Digi3 - thanks for the hot tip re. leaflet.js - looks interesting - I have set up everything I needed in LISE and I'm 80% finished with all the JS in the summary template. I'll do another version of the summary template that embeds leaflet.js see how they compare. Thanks
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: CGGoogleMaps / Google Maps API

Post by Charles Butcher »

Thank you both. My use of Google Maps sounds a lot like MantaPro's: three or four maps, 20 or 30 static POIs marked by a selection of different icons, with pop-ups showing text and photos. One of the maps displays a boundary as a KML file.

CGGoogleMaps made all that very easy, but as DIGI3 says it's not reasonable to expect anyone to update it for free. On the other hand, my maps are on a community website, and if we could find any money for development I'd rather spend it on a redesign of the whole site.

Despite DIGI3's kind offer, I was going to say that moving to LISE and Leaflet would be beyond me. But then I looked at https://easythemes.ca/lise-instances/lise-leaflet and think I might invest $19 to play with that.

I'm guessing that maps are important to many CMSMS websites, especially where there's a need to plot dynamic locations from a company directory or whatever. So as MantaPro implied, I hope we can converge towards some well-known solutions, whether these are baked into CMSMS or not.
MantaPro
Forum Members
Forum Members
Posts: 97
Joined: Sun Feb 03, 2008 8:14 pm

Re: CGGoogleMaps / Google Maps API

Post by MantaPro »

Wow that https://easythemes.ca/lise-instances/lise-leaflet a looks excellent - I wish I had found that 2 days ago.

Charles, in case you haven't realised it easythemes.ca is Matt Hornsby aka DIGI3 - thanks Matt/Digi3
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: CGGoogleMaps / Google Maps API

Post by Charles Butcher »

Ha! I worked that out two minutes ago, and popped along here to say that I'd made the connection. Thanks for beating me to it. I think that answers my question: “Is this a reputable supplier?”.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1606
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGGoogleMaps / Google Maps API

Post by DIGI3 »

Thanks guys. My only comment would be that the LISE instance on easythemes is mostly an example to get you started - you'll likely need to dig into the leaflet.js documentation to really make it do what you want. I think it should make the learning curve a lot easier though, even if you only end up borrowing bits of code from it.
Not getting the answer you need? CMSMS support options
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 102
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: CGGoogleMaps / Google Maps API

Post by Charles Butcher »

Thanks DIGI3. I have invested 20 Great British Pounds and now have a map. Soon it might even show my own data rather than the demo. It's a great start.
Post Reply

Return to “Modules/Add-Ons”