Error : Object doesn't support this property or method

110 views
Skip to first unread message

Chitransh Shrivastava

unread,
Jan 13, 2012, 12:47:54 AM1/13/12
to google-map...@googlegroups.com
Hi

I am using keyDragzoomApi on the google map an i am binding the this api on google map reference like:

map.enableKeyDragZoom({ key: 'shift' });

It is working fine when I have loaded api fist time with any google map language like en.
src="//maps.googleapis.com/maps/api/js?sensor=false&language=en"

but when i am changing the language dynamically by changing script tag src uri and calling call back function to initialize map. like
document.getElementById('maplink').src = "//maps.googleapis.com/maps/api/js?sensor=false&language="+lng+"&callback=initializeMain";

Then binding keyDragzoom with google refrence is giving error on .
map.enableKeyDragZoom({ key: 'shift' }); -> This line.

IE Error is: Object doesn't support this property or method

can you please help me on this.
Thanks in advance.


sb

unread,
Jan 13, 2012, 1:55:03 AM1/13/12
to Google Maps JavaScript API v3
Please would you be so kind as to post a link to your site.

On Jan 13, 12:47 am, Chitransh Shrivastava <getchitra...@gmail.com>
wrote:

Rossko

unread,
Jan 13, 2012, 4:33:31 AM1/13/12
to Google Maps JavaScript API v3
> but when i am changing the language dynamically by changing script tag src
> uri

What makes you think that is likely to work properly for any script or
API in any browser?

I don't know of any way to change the API language after loading,
others have asked before
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/d41f5c8fb8150726/c81373b32fd51816?lnk=gst&q=change+language#c81373b32fd51816
Reply all
Reply to author
Forward
0 new messages