CFMAP

337 views
Skip to first unread message

Killick

unread,
Jun 19, 2012, 9:49:22 AM6/19/12
to ra...@googlegroups.com
Hi Everyone,

I'm using version 3.3.3.001 and can't get CFMAP to do anything at all? No error messages, just blank.

Am I missing something?:

 <cfajaximport params="#{googlemapkey='mykeycodefromgoogle'}#">

<cfmap name="gmap01"
     centerlatitude="47.799069"
        centerlongitude="-40.979576"
        zoomlevel="5"
        height="600"
        width="600"
        showcentermarker="false"
         type="map"
         typecontrol ="basic"
         zoomcontrol ="large3d"   >


Andrea Campolonghi

unread,
Jun 19, 2012, 10:04:40 AM6/19/12
to ra...@googlegroups.com
Here is the demo site.
http://railo-ajax.andreacfm.cloudbees.net/demo/index.cfm

What is the page output source?

Andrea
Andrea Campolonghi
and...@getrailo.org



Killick

unread,
Jun 19, 2012, 10:09:18 AM6/19/12
to ra...@googlegroups.com
Thanks Andrea.

Page output source:

<!-- Railo-Ajax-Core --> <script type="text/javascript">
				var _cf_ajaxscriptsrc = '/mapping-tag/railo/core/ajax/JSLoader.cfc?method=get&lib=';
				var _cf_ajaxcsssrc = '/mapping-tag/railo/core/ajax/css/';
				var _cf_loadingtexthtml = '<div style="text-align: center;"><img src="/mapping-tag/railo/core/ajax/loader/loading.gif.cfm"/></div>';				
				var _cf_params = {"GOOGLEMAPKEY":"AIzaSyAQeXM9cVeQnHvTvta4s14ypncW0EMMdBQ"};
				</script>
				<script type="text/javascript" src="/mapping-tag/railo/core/ajax/JSLoader.cfc?method=get&lib=RailoAjax"></script><!-- _cf_map_import --> <script type="text/javascript">
				Railo.Ajax.importTag('CFMAP',null,'google','/mapping-tag/railo/core/ajax/JSLoader.cfc?method=get&lib=');
				</script>





Killick

unread,
Jun 19, 2012, 10:15:11 AM6/19/12
to ra...@googlegroups.com
I just ran a test using your "Basic Usage" example and still nothing?

<!-- Railo-Ajax-Core --> <script type="text/javascript">
				var _cf_ajaxscriptsrc = '/mapping-tag/railo/core/ajax/JSLoader.cfc?method=get&lib=';
				var _cf_ajaxcsssrc = '/mapping-tag/railo/core/ajax/css/';
				var _cf_loadingtexthtml = '<div style="text-align: center;"><img src="/mapping-tag/railo/core/ajax/loader/loading.gif.cfm"/></d
iv>';				
				var _cf_params = {"GOOGLEMAPKEY":"AIzaSyAQeXM9cVeQnHvTvta4s14ypncW0ELNdBQ"};
				
</script>
				<script type="text/javascript" src="/mapping-tag/railo/core/ajax/JSLoader.cfc?method=get&lib=RailoAjax"></script><!-- _cf_map_import --> <script type="text/javascript">

				Railo.Ajax.importTag('CFMAP',null,'google','/mapping-tag/railo/core/ajax/JSLoader.cfc?method=get&lib=');
				</script><!-- _Railo_Map_62416102 --> <script type="text/javascript">
		_Railo_Map_62416102_on_Load = function(){
			Railo.Map.init('myMap',{"markerwindowcontent":"","onnotfound":"","centerlatitude":"","width":400,"continuouszoom":true,"markericon":"","doubleclickzoom":true,"type":"map","zoomcontrol":"small","tip":"","ZOOMLEVEL":"10","typecontrol":"basic","showscale":false,"onerror":"","showcentermarker":true,"height":400,"overview":false,"onload":"","CENTERADDRESS":"345 Park Avenue, san jose, CA 95110-2704, USA","markercolor":"","centerlongitude":""});
			
		}		
		Railo.Events.subscribe(_Railo_Map_62416102_on_Load,'onLoad');	
		</script>

Andrea Campolonghi

unread,
Jun 19, 2012, 10:39:46 AM6/19/12
to ra...@googlegroups.com
Errors in firebug?
Are all js loaded? Even google maps js?
What browser? May you run demo site with the same browser?

Andrea
Andrea Campolonghi



Killick

unread,
Jun 19, 2012, 10:58:15 AM6/19/12
to Railo
Andrea,

Using this code:

<cfajaximport
params="#{googlemapkey='AIzaSyAQeXM9cVeQnHvTvta4s14ypncW0ELNdBQ'}#">

<cfmap
name="myMap"
centeraddress="345 Park Avenue, san jose, CA 95110-2704, USA"
zoomlevel="10"/>

In Firefox Firebug I get: "d.centeraddress is undefined"

I *think* all js loaded. If I run the demo site I get a Google API key
error message..no map.

The page is here: http://199.73.57.189/map.cfm

Wondering if this has something to do with the new Google API key
system using services? This is the first time I've used it.

Andrea Campolonghi

unread,
Jun 19, 2012, 11:33:59 AM6/19/12
to ra...@googlegroups.com
Only first example fails on demo site cause I possibly forgot to update the key.
All the other examples works fine.
See:
http://railo-ajax.andreacfm.cloudbees.net/demo/index.cfm?template=cfmap/events.cfm

Are you sure you have enabled the google map services for the key you are using?

Andrea
Andrea Campolonghi
and...@getrailo.org



Killick

unread,
Jun 19, 2012, 12:04:06 PM6/19/12
to Railo
Hi Andrea,

I do have the Google Maps API v2 service turned on, (v3 also).

I'm still getting this error is Firebug:
"d.centeraddress is undefined"

I tried using the code from your cfmap events page, and got the same
error as above.

I'm wondering now..I recently upgraded Railo to 3.3.3.001 from an
older version and got the message to update my jars, which I did.
Could my Railo install be missing something?





On Jun 19, 11:33 am, Andrea Campolonghi <and...@getrailo.org> wrote:
> Only first example fails on demo site cause I possibly forgot to update the key.
> All the other examples works fine.
> See:http://railo-ajax.andreacfm.cloudbees.net/demo/index.cfm?template=cfm...

Jean Moniatte

unread,
Jun 19, 2012, 12:17:05 PM6/19/12
to ra...@googlegroups.com
Just out of curiosity, what is the advantage of using CFMAP to generate something that is 100% client side? Why not simply code the map using HTML+JS+CSS per Google's specifications? What value does Railo add to the mix?

Thanks,
Jean
--
Jean Moniatte
UGAL

Andrea Campolonghi

unread,
Jun 19, 2012, 12:26:20 PM6/19/12
to ra...@googlegroups.com
@Killick
Forgive me.
I am bit lost.
Are you telling me that you cannot see correctly the demo site with firefox?

@Jean
You can makes things fast if you do not know nothing about js.
If you are a js ninja this is possibly not for you.

Andrea
Andrea Campolonghi



Jean Moniatte

unread,
Jun 19, 2012, 12:31:18 PM6/19/12
to ra...@googlegroups.com

Ok make sense, even though me no js ninja :-)

Thanks,
Jean

Killick

unread,
Jun 19, 2012, 12:34:42 PM6/19/12
to Railo
Andrea,
Your demo site works fine with Firefox.
When I look at my page I get an error in firebug, even if I use your
example code.

Error: "d.centeraddress is undefined"



On Jun 19, 12:26 pm, Andrea Campolonghi <and...@getrailo.org> wrote:
> @Killick
> Forgive me.
> I am bit lost.
> Are you telling me that you cannot see correctly the demo site with firefox?
>
> @Jean
> You can makes things fast if you do not know nothing about js.
> If you are a js ninja this is possibly not for you.
>
> Andrea
>
> On Jun 19, 2012, at 6:17 PM, Jean Moniatte wrote:
>
>
>
>
>
>
>
>
>
> > Just out of curiosity, what is the advantage of using CFMAP to generate something that is 100% client side? Why not simply code the map using HTML+JS+CSS per Google's specifications? What value does Railo add to the mix?
>
> > Thanks,
> > Jean
> > --
> > Jean Moniatte
> > UGAL
> > j...@ugal.com
> >www.ugal.com

Killick

unread,
Jun 19, 2012, 12:49:31 PM6/19/12
to Railo
Just to be clear,

I get the error with the most basic of code:
<cfajaximport
params="#{googlemapkey='AIzaSyCTRj_2hgDsz3YOCtmsw5cQxwrBWgSmORk'}#">

<cfmap
name="myMap"
centeraddress="345 Park Avenue, san jose, CA 95110-2704, USA"
zoomlevel="10"/>

See: http://199.73.57.189/map.cfm
Message has been deleted

Killick

unread,
Jun 19, 2012, 6:31:40 PM6/19/12
to Railo
Well, more on this. I tried the exact same code on a different server
running Railo 3.3.2.002 final, and it works!

So what's wrong with my Railo 3.3.3.001 install?

Is there a way to get a URL for the 3.3.2.002 patch?

Killick

unread,
Jun 19, 2012, 6:44:56 PM6/19/12
to ra...@googlegroups.com
Even more. I updated Railo to 3.3.4.003 and still no luck.

The code is fine, updating Railo does not help. What could I be missing? Javascript libraries?

Peter Boughton

unread,
Jun 19, 2012, 7:02:12 PM6/19/12
to ra...@googlegroups.com
> Is there a way to get a URL for the 3.3.2.002 patch?

I'm not sure there's an update URL, since that's an old version, but
you can find the patch file for 3.3.2.002 on your server that is
running it. :)

Depending on how the server is setup, look at
tomcat/lib/railo-server/patches/3.3.2.002.rc or
jetty/lib/ext/railo-server/patches/3.3.2.002.rc or similar.

You can simply copy that rc file to your other server, remove/rename
the newer rc file(s) so they don't get applied, then restart.

No idea if this will help with the problem, but at least it'll narrow
things down one way or the other.

Andrea Campolonghi

unread,
Jun 20, 2012, 3:18:34 AM6/20/12
to ra...@googlegroups.com
Please open a ticket for this and add your entire cfm page test as example (including html).

Thanks

Andrea
Andrea Campolonghi
and...@getrailo.org



Andrea Campolonghi

unread,
Jun 20, 2012, 3:30:19 AM6/20/12
to ra...@googlegroups.com
Just to confirm.
Craete a file anc copy paste this code:

<html>
<head>
<title></title>
</head>
<body>

<cfajaximport
params="#{googlemapkey='AIzaSyCTRj_2hgDsz3YOCtmsw5cQxwrBWgSmORk'}#">

<cfmap
name="myMap"
centeraddress="345 Park Avenue, san jose, CA 95110-2704, USA"
zoomlevel="10"/>

</body>
</html>

Does this not work for you?

Andrea
Andrea Campolonghi
and...@getrailo.org



Killick

unread,
Jun 20, 2012, 11:31:38 AM6/20/12
to ra...@googlegroups.com
Correct, that code does not work:
http://199.73.57.189/map.cfm

I tried patching Railo 3.3.001 to 3.3.4.003 and still no luck.

Andrea Campolonghi

unread,
Jun 20, 2012, 11:52:34 AM6/20/12
to ra...@googlegroups.com
Works fine on my machine.
I really cannot reproduce this.
I need some more input.

Does this works for you locally?

Andrea
Andrea Campolonghi



Alan Holden

unread,
Jun 20, 2012, 1:02:04 PM6/20/12
to ra...@googlegroups.com
I can. http://199.73.57.189/map.cfm does NOT work on my machine.
I get these errors:

"d.centeraddress is undefined"
Win 7 64 - Firefox 13.0.1 with Firebug 1.9.2

"SCRIPT5007: Unable to get value of the property 'length': object is null or undefined
JSLoader.cfc?method=get&lib=RailoMap, line 111 character 198"
IE 9.0.8112 Compatibility view

"TypeError: 'undefined' is not an object (evaluating 'd.centeraddress.length')" JSLoader.cfc:111
Safari 5.1.7

HTH,
Al

Killick

unread,
Jun 20, 2012, 3:45:52 PM6/20/12
to ra...@googlegroups.com
More on this. I found the 3.3.2.002 patch from the other server that worked, added it to the railo/server/patches dir on the problem server, downgraded and it now works.

It would appear that CFMAP works fine on 3.3.2.002, fails on 3.3.001 and 3.3.4.003.

Andrea Campolonghi

unread,
Jun 20, 2012, 4:31:07 PM6/20/12
to ra...@googlegroups.com
I see you tested IE and safari.
Is this working for you on Chrome and Firefox?

Andrea
Andrea Campolonghi



Andrea Campolonghi

unread,
Jun 20, 2012, 4:31:25 PM6/20/12
to ra...@googlegroups.com
Please open a ticket in jira.

Andrea
Andrea Campolonghi



Killick

unread,
Jun 20, 2012, 5:22:30 PM6/20/12
to ra...@googlegroups.com
Andrea,

I did test in IE, Firefox and Chrome. It works great using Railo 3.3.2.002. Not in newer versions. Can you direct me where to open the ticket?

Alan Holden

unread,
Jun 20, 2012, 5:55:12 PM6/20/12
to ra...@googlegroups.com
My Firefox test was within the thread below.
The URL worked successfully in Win 7 64 - Chrome 19.0.1084.56 m
Al

Andrea Campolonghi

unread,
Jun 21, 2012, 3:53:10 AM6/21/12
to ra...@googlegroups.com

Andrea Campolonghi

unread,
Jun 21, 2012, 10:43:05 AM6/21/12
to ra...@googlegroups.com
I think I got it.
Please open a ticket so that I can be sure I am looking at the right thing.

Andrea
Andrea Campolonghi



Andrea Campolonghi

unread,
Jun 21, 2012, 11:50:15 AM6/21/12
to ra...@googlegroups.com
Please try to change the Map.cfc with the ones in attach.
lib/railo-server/context/library/tag

Andrea
Map.cfc

Andrea Campolonghi

unread,
Jun 22, 2012, 3:05:57 AM6/22/12
to ra...@googlegroups.com
A patch will be in the next release.
thx for input

Andrea

<Map.cfc>

Andrea Campolonghi



Reply all
Reply to author
Forward
0 new messages