Skip to main content
Known Participant
Jun 25, 2019 8:09 AM UTC
Question

Using Google maps within a .cfc

I am rendering web pages exclusively using AJAX content. 

One "object" I cannot get to work is Google maps.

Everything else is contained within a .cfc component and cfsavecontent. 

Using this method I can only put a static map image.

Anyone know if / how to insert a dynamic map using this method?

Either using CFMAP or a javascript / jquery equivalent.  I've tried both.

This topic is closed to new replies. Start a new post to keep the conversation going.

19 replies

Charlie Arehart
Community Expert
Community Expert
Jun 25, 2019 1:39 PM UTC

Have you tried it first in a cfm (in such a cfsavecontent)? I can imagine why it may not work, and perhaps taking the cfc out of the equation will help you better find the problem.

If it doesn't. can you offer a simple few line standalone demo, first working without cfsavecontent? Then show using it? I realize you won't want to share your google maps api key.

Translate
/Charlie (troubleshooter, carehart. org)
Known Participant
Jun 25, 2019 2:26 PM UTC

Absolutely - I HAVE tried it in a standalone .cfm

But that's "old school". 

Works FINE

It's simply a matter of it not working within a cfsavecontent or within a component. 

Translate
EddieLotter
Inspiring
Jun 25, 2019 3:55 PM UTC

Did you read Charlie's second paragraph?

Translate