Skip to main content
Known Participant
June 25, 2019
Question

Using Google maps within a .cfc

  • June 25, 2019
  • 1 reply
  • 1903 views

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 has been closed for replies.

1 reply

Charlie Arehart
Community Expert
Community Expert
June 25, 2019

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.

/Charlie (troubleshooter, carehart. org)
Known Participant
June 25, 2019

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. 

EddieLotter
Inspiring
June 25, 2019

Did you read Charlie's second paragraph?