I’m using the display_map shortcode to display multiple markers. I get a js error because the google.maps.LatLng function has no valid attributes.

this is the code I use:

[display_map address1="Juan Ramírez de Velasco 1287, Buenos Aires" address2="Defensa 713, Buenos Aires" address3="Perú 84, Buenos Aires" zoom=2]

this is what I get:

var infoWindows=[];google.load("maps","3.7",{"other_params" :"sensor=false&libraries=places,weather,panoramio&language=en"});google.setOnLoadCallback(initialize);function initialize(){var latlng=new google.maps.LatLng(,);var mapOptions={zoom: 2,scrollwheel:true,panControl:true,zoomControl:true,mapTypeControl:true,scaleControl:true,streetViewControl:true,overviewMapControl:true,overviewMapControlOptions:{opened:true},center: latlng,mapTypeId: google.maps.MapTypeId.ROADMAP};wgmpmap=new google.maps.Map(document.getElementById("wgmpmap"),mapOptions);marker0wgmpmap=new google.maps.Marker({map: wgmpmap,draggable:false,position: new google.maps.LatLng(,),title:"",clickable:false,icon:""});}function wgmp_closeAllInfoWindows(){for (var i=0;i<infoWindows.length;i++){ infoWindows[i].close();}infoWindows=[];}

I’m using WordPress 4.2.2


Staff May 13, 2015

I pasted above shortcode on our test site and it's working. Please deactivate all plugins once or switch the theme if you still get this issue? see the output of the shortcode in attachment.

thank you very much. I tested a lot of times, and saw the issue occurs sometimes, with no common configurations neither apparent cause. may be a server disfunction? I will keep trying.

do you have any clue to track the problem?

thanks again.
Staff May 14, 2015

Google has some limitation for reverse geocoding of the address so might be you're getting that limit in the day and then it stop to work.

thank you very much!
hello, i found something that can be usefull for others with the same issue:

sometimes, the timeout of the wp_remote_get function is lower than the http response time. my problem was solved by modifying of wpgmp-display-map.php in line 26, adding the second attribute of wp_remote_get function width my custom value to the timeout attribute.

see the wordpress doc: http://codex.wordpress.org/Function_API/wp_remote_get
Staff June 29, 2015

@sinpropiedad - Definitely it's a great help who is getting same error sometimes.

@sinpropiedad I believe I am having the same issue - receiving the

SCRIPT438: Object doesn't support this property or method

In regard to
wgmpmap=new google.maps.Map(document.getElementById("wgmpmap"),mapOptions);

Could you please explain in more detail how you fixed this?

Staff July 30, 2015
Hello @jaymsking,

Can you please give me page url where you're having this problem? and please send me wp login also so i can check your map setting. My mail is hello@flippercode.com

I'm sorry, @aymsking, but I have no more details. just see the wordpress docs and modify the wp_remote_get() attributes in line 26 of wpgmp-display-map.php.

maybe your problem have different solution....

Please login or Register to Submit Answer