I'm creating a new website located on an subdomain http://promo.gouwgent.be of our main website http://www.gouwgent.be. Both sites are using the same database. I've created a GMap view to display all nodes of a certain type on a google-map. This maps displays correctly on the main site, but on the same page in the subdomain no markers are added. What is the problem here?

PS: I've requested a Google api key for the subdomain and added this to the $conf array in the subdomains settings.php file.

Comments

bm-1’s picture

setvik’s picture

We have the same problem as well.
Our site uses subdomains.

Displays correctly on the primary domain.

Neither the markers nor zoom control display on subdomain pages.

markDrupal’s picture

I can confirm the same problem on my site as well.

when I try viewing the same page at 2 locations (our site does some funky subdomain URL rewrites so the following 2 URLs are the same content)

http://mark.org/_Shiga/Event/map ----This page shows the map no problem
http://Shiga.mark.org/Event/map -----This page shows the map - no Zoom controls, and no marker

the only error i got from fire bug is

[Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

Searching google shows that this is some sort of URL issuse

bdragon’s picture

Ahh, now THAT makes more sense.

Some of the system is loaded dynamically. If it ends up getting the base path wrong, stuff like markers disappearing happen due to the javascript same-origin policy.

mendelson’s picture

Here is my solution for this problem. Maybe it help's some one.

I changed the icon.js file in gmap/js directory.

// $.getJSON(Drupal.gmap.querypath + '/markers', Drupal.gmap.iconSetup);

$.getJSON('http://'+location.host+'/map/query' + '/markers', Drupal.gmap.iconSetup);

bdragon’s picture

Status: Active » Fixed

With http://drupal.org/cvs?commit=116996, the querypath is now A) stored globally, and B) relative instead of absolute.

So, considering this fixed.

bdragon’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

jauzah’s picture

Version: 5.x-1.x-dev » 5.x-1.0-rc1

I have the newest version of gmaps for d5 and I face the same problem like this. There is no zoom scroller on the left and markers don't work.

Firebug warns for one error:
icon.js (row 185)
Drupal.gmap.iconSetup is not a function
[Break on this error] Drupal.gmap.iconSetup();

The patches published here are for older versions, so I can't use them and I am not able to optimise them for the 5.x-1.0-rc1 version of gmap.