Since some time, this module does not display the new maps correctly anymore, showing any place in the World instead.

I suspect that gmaps issues now very verbose links like this one:
http://maps.google.fr/maps?q=1+Terrasse+Bellini,+Puteaux&hl=fr&ie=UTF8&sll=46.75984,1.738281&sspn=8.354699,19.753418&oq=1,+terrasse+bellini&vpsrc=0&hnear=1+Terrasse+Bellini,+92800+Puteaux,+Hauts-de-Seine,+%C3%8Ele-de-France&t=m&z=16

The same location can also be rendered by this (shorter) link
http://maps.google.fr/maps?q=1+Terrasse+Bellini,+Puteaux&hl=fr&ie=UTF8&ll=48.887379,2.251618&spn=0.007831,0.01929&hnear=1+Terrasse+Bellini,+92800+Puteaux,+Hauts-de-Seine,+%C3%8Ele-de-France&t=m&z=16&vpsrc=0

that works

Maybe the database field is inappropriate?

Comments

angelusnoctis’s picture

Has anyone found an answer to this? I have been trying it for weeks but I cannot find a solution.

angelusnoctis’s picture

I finally found the issue. The module recognizes the GoogleMaps url and in some way it splits it counting the characters. It assumes that you have a URL starting with http://maps.google.com, but it isn't always that way. In my case I had https://maps.google.es/

You can find the URL in embed_gmap.module, line 97:

  if (drupal_substr($code, 0, 23) == 'http://maps.google.com/') {

My URL has 23 characters too including the slash, so I didn't have to change the number, but for the case of http://maps.google.fr/, you should change to this (as you have 22 characters until the URL "split"):

  if (drupal_substr($code, 0, 22) == 'http://maps.google.fr/') {

I hope this helps. This has worked for me.

jvieille’s picture

Title: Does not work with certain (long?) uirls » Works only with maps.google.com (not .es, .fr...)
Status: Active » Fixed

Thank you very much for the finding.
Actually, one cannot assume that the maps url will be .com, /es, .fr or whatever.
I opted not to change the code, but to edit the field description to tell the user to only use maps.google.com

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.