This one is part of META issue #1931138: Fixing all 'single marker' issues

Ok so i know alot of people have trouble getting markers to show up, and I'm no different. I've scoured all the issues and tried all the fixes but nothing's getting them to work...can someone help me get them to work??

My site is at http://jettzilla.com

Help...please...i'll, uh, thank you and wish good things your way :D

CommentFileSizeAuthor
#32 gmap_923630_32_showmarker.patch1.06 KBjohnv

Comments

wsali’s picture

Are you installing it on a clean install of Drupal 6.19?

Jettzilla’s picture

I want to but to be honest i don't really know how cuz i'm scared of losing all of my stuff! i probably just need to sit down and learn how to update the site, don't i? think that would fix the problem?

wsali’s picture

I was just comparing your issue to mine, which seems to be the same. I am going to try it on a test machine that is not on a shared host and see if it works there.

I am running a clean Drupal 6.19 installation and still it does not work.

wsali’s picture

My issue was resolved by doing a chmod 555 on the /site/default folder. It seemed to be the "other" execute bit.

Jettzilla’s picture

my default folder is already set at 555 and it's not working. i just can't figure out what on earth is causing this!

smscotten’s picture

I only discovered this by doing a clean install but it affects all my other sites. Upgrading to major though I'm tempted to mark it as critical. Maps without markers aren't very useful.

smscotten’s picture

Priority: Normal » Major

I'm unable to find any javascript errors or errors in the drupal log. Tried updating to the dev version of the module. As mentioned in #6 I did a clean drupal 6.19 install. I've tried switching marker managers (was using default "no marker manager" before). I've run through versions of jquery-ui (including of course not having it installed at all) and nothing I do gives me markers on any maps. I'm completely out of testing options and the module simply does not show markers under any circumstances.

pmflav’s picture

Priority: Major » Critical

Having the same problem.
No idea why it's not working.
Tried the stable and dev version, no change.

light9’s picture

subscribe

dmundra’s picture

subscribe

libor.fettr’s picture

Had the same problem. Fixed by modification of "Drupal.gmap.iconpath" in the file /sites/default/files/js/gmap_markers.js. New value is "/sites/all/modules/gmap/markers".

smscotten’s picture

Re #11 thanks but my Drupal.gmap.iconpath is already "/sites/all/modules/gmap/markers" and I'm still out of luck.

magnus’s picture

I had the same problem and spent a couple of hours in frustration trying to identify what was happening and had prepared a long list of my error report.
In my case it turned out to be a really, really simple matter. After I entered the Goggle Maps API key I clicked the "Regenerate" button, which gave me the error that my key was missing. What I didn't do was Save settings at the bottom of the page!

I feel really stupid now =)

rumblewand’s picture

This is my first time to use the GMAP module and am having the same issue. I have read countless posts and possible solutions to the problem but it persists.

Using latest DEV release of GMAP as of Dec 9. on a remote server.
My markers.js file disappears randomly and reappears on rebuild of the markers.
Even with the rebuild of markers I cannot get one to appear on the "locations map".
I do not get a map to manually add markers when using the default enabled locations fields added to my event form. (though not having used this mod before this may be a limitation of locations?)
I do get a map when adding the cck location field to my event form. (I can add a marker but it may disappear and not come back if I fiddle with the map & it WILL NOT show up in preview or save).
No errors in log.
I DO use drupal for facebook with fb connect.
Nothing shows in the locations block (I'm pretty sure the markers.js file is not updating though it is writable)
This issue could be related - #363690: Can't see the map at all

bengibollen’s picture

No markers in node locations. Markers do show up as expected in gmap block on a node with location and in views with a proximity filter.
I first thought that the problems was with gmap_markers.js that didn't get loaded. But I forced it with the dynamic markers option and markers still didn't show up (javascript did). So I guess that gmap_markers.js only loads if there are markers to be shown.
On my local development site I don't have this problem at all, only on the production site. The differneces are some seemingly unrelated modules and php version (5.3.x on development site and 5.2.x on production site).

bengibollen’s picture

I found the important difference between my sites: Localization.
The content type with location is language neutral because it's only shop name and adress, nothing to translate. But production site is configured to handle translated content. The SQL that is generated by gmap_location_node_page() in gmap_location.module is
SELECT n.nid, n.type, n.title, l.latitude, l.longitude FROM {node} n INNER JOIN {location_instance} i ON n.vid = i.vid INNER JOIN {location} l ON l.lid = i.lid WHERE (n.language ='en') AND ( n.status = 1 AND (l.latitude != 0 OR l.longitude != 0) )
on production site and
SELECT n.nid, n.type, n.title, l.latitude, l.longitude FROM {node} n INNER JOIN {location_instance} i ON n.vid = i.vid INNER JOIN {location} l ON l.lid = i.lid WHERE (n.language ='sv' OR n.language ='' OR n.language IS NULL) AND ( n.status = 1 AND (l.latitude != 0 OR l.longitude != 0) )
on develop site, where I haven't configured localization correctly.
I'll try to figure out how to deal with this.

rumblewand’s picture

My issues were resolved when I switched from a zen nine-sixty subtheme to fusion theme. Works as expected. Might try using latest dev releases too.

EvanDonovan’s picture

Title: Markers Not Showing Up No Matter What!! » Markers not showing up on Gmaps no matter what: How to debug
Category: bug » support
Priority: Critical » Major

I've looked at this for approximately 5 hours. With Bdragon's assistance, I've come up with a few things to check out, in order:

  1. Make sure that your theme has print $closure at the bottom
  2. Make sure that there are markers on the map (look for a Drupal.settings JSON array with "markers" in it)
  3. Make sure that if you are using a third-party marker manager that it is in the thirdparty directory under gmap
  4. Make sure that gmap_markers.js exists, is being loaded, and has the correct path to the markers, and a JSON array of marker data. Go to admin/settings/gmap and regenerate the marker cache if it is broken. If that doesn't work, check the settings in admin/settings/file-system, and if the permissions are wrong, fix them in the directories.
  5. Do not use the GMarkerManager (I don't think it works anymore) - use the third-party MarkerManager instead
  6. Make sure that on the GMap macro in question, that if it contains a zoom value, that zoom=[Maximum Zoom and/or Minimum Zoom] on the marker manager. Set autozoom in the main Gmap settings if possible. (This was required for me only on 6.x-1.x-dev, not 6.x-1.1.)

If this don't work, you can try the following (which I don't think should be necessary):

  1. Move $scripts to the top of your theme below $styles instead of at the bottom above $closure
  2. Change the line at the top of gmap.module to say define('GMAP_API_VERSION', '2');

I think that one or more of these things should fix issues with the markers not showing up, in both 6.x-1.1 and the latest 6.x-1.x-dev. Thus, I have changed this to a support request.

EvanDonovan’s picture

Status: Active » Needs review

I've turned my lists, above, into a documentation page: http://drupal.org/node/1071244. I think that after a few months, if no one else has added to that list, I am going to mark this issue as "fixed", since it's become a catch-all for lots of different problems that only happen to exhibit the same symptoms (i.e., no markers).

angelD’s picture

Hi every1, i have a problem i can't fix after reading all the propositions here. Here is my issue -

I'm working with drupal 6.2, gmap module 6.x-1.1 and i've used the "gmap_simple_map" in my node-mypage.tpl.php to display the map.

$latitude = $node->location['latitude'];
$longitude = $node->location['longitude'];
print gmap_simple_map($latitude, $longitude, ' ', ' ', 15, '500px', '400px', TRUE, ' ');

It takes parameters like width, height and zoom and so on, i see the map on my page, but the marker and the bubble are missing.

So, I'm not using third party, from these 8 tips: 2 yes; 4 yes; 5 not using that.
The only thing i haven't try is the "print $closure;", but the thing is that i don't know in which file to search for this (I'm pretty new in Drupal) so if some1 can be more specific about this1 i would be gratefull.

Any other ideas? Pls HELP i have a headache already

EvanDonovan’s picture

I don't think that your code will render a marker since you would need to add the marker info to the parameters passed to the function, but I am not sure if gmap_simple_map() accepts that as a parameter.

Also print $closure; should be near the bottom of your page.tpl.php, and any variants thereof. If someone could add that info to the documentation page I created, that might be helpful.

angelD’s picture

Yes "print $closure", $scripts is right after $styles, everything seems to be in order but still no markers. Anyway I'm redy to drop it, but pls tell me another way to draw this map, to be visible on my page, i'll find tuts how to do it, but i don't know what i suppose to look 4. I followed tut 4 the gmap_simple_map and i've did exactly what this guy did, but somehow its not working 4 me :(

EvanDonovan’s picture

@angelD: Try making a gmap macro string in your tpl.php, then calling gmap_parse_macro($macro), then calling theme('gmap', $macro_data). You can use the gmap macro builder module to figure out how the macro string should look.

I can post code if you want but might be better as a handbook page, to which I could link.

angelD’s picture

Yes a link to a handbook would be perfect :) 10x 4 the fast reply

gone404’s picture

subscribe

memoo’s picture

subscribe

controls only show on page admin/settings/gmap
Map Behavior flags are not saved
the only setting that gets saved is Default map type

Char’s picture

I am using Drupal 7, and have installed GMap 7.x-1.x-dev. I thought everything was working until I put the site online. My markers show up on my map locally, but not online. I have been reading all the posts and attempting all the fixes people discuss. This problem still exists, I don't get any errors either. Is it too soon to use the 7.x-1.x-dev? can I use a version 6 on a Drupal 7 install?

ifernando’s picture

Version: 6.x-1.1 » 7.x-2.x-dev

In Drupal 7 I found this problem in the views after clearing the caches. I found that marked will reappear after you visit the original nodes that the view query. I hope it helps.

johnv’s picture

My case is the opposite of #27. Markers shows nice in production, but not on development.
it turned out that the 'gmap_markers.js' files was read from https:// (how the production is set) , not http:// (how the dev is set)

The following change made it work form me.
The affected code was new since #1061444-64: Javascript is required to view this map.: missing gmap_markers.js .
the js-files are included tiwce, once in gmap_gmap(), and once in _gmap_base_js().
Perhaps my change invalidates the use for multi-site installations.

--- gmap.module	(revision 1384)
+++ gmap.module	(working copy)
@@ -330,11 +330,12 @@
     'type' => 'external',
   );
 
-  $ret[file_create_url('public://js/gmap_markers.js')] = array(
-    'type' => 'external',
-    'weight' => 2,
-  );
-
+  $path2 = variable_get('file_public_path', conf_path() . '/files');
+  $ret[$path2 . '/js/gmap_markers.js'] = array('weight' => 2);
   return $ret;
 }
podarok’s picture

#29 could You please provide a patches against latest 2.x-dev ?

podarok’s picture

Status: Needs review » Needs work

status

johnv’s picture

Status: Needs work » Needs review
StatusFileSize
new1.06 KB

Please find attached a proper 2.x patch for #27.

podarok’s picture

#32 commited pushed to 7.x-2.x-dev

Thanks @johnv

podarok’s picture

Status: Needs review » Fixed

tagged http://drupal.org/node/1926744 7.x-2.4-beta2 release for testing

marty2081’s picture

Status: Fixed » Needs review

Sorry, putting this back to 'needs review'.

The patch from #32 only worked for me when I added a '/' in front of the variable_get('file_public_path', conf_path() . '/files') .
'/js/gmap_markers.js'
part

So it became:

$ret['/' . variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_markers.js'] = array(
    'type' => 'external',
    'weight' => 2,
  );

Also see #1929544: Fix for Relative Path from Root to gmap_markers.js to make Markers show

podarok’s picture

#35 what kind of review needs here?
Status needs review has to be when You uploading a patch for review or pointing to patch for manual review

marty2081’s picture

Status: Needs review » Needs work

OK, needs work then ;) The point is that this fix is not complete, since it breaks the functionality in my case.

podarok’s picture

Issue tags: +Needs tests

tag

junkbox’s picture

doh!
you're not alone...happened to me as well 2 1/2 years later...realized that I had recently 'Regenerated' as well.

johnv’s picture

@Marty2081 , is latest -dev still not working? What is your use case?
Are you using subdirectories, like #1218870: Marker managers give wrong path to marker icon when Drupal is not installed at root

johnv’s picture

Status: Needs work » Fixed

IMO #32 is fixed in another issue.

lennonseno’s picture

i replaced the '/' in front with base_path(). works better with drupal installation not in root. so it becomes:

$ret[base_path() . variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_markers.js'] = array(
    'type' => 'external',
    'weight' => 2,
  );

Status: Fixed » Closed (fixed)

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

alberthendriks2’s picture

The comment at the link below is supposed to solve something else, but in my case it solves the marker issue (Drupal 7).
https://drupal.org/node/1257872#comment-5519760

pearl.liang’s picture

Just want to share my experience. I had the same problem with 7.x-2.x updated in Oct 2013.
Later my problem is solved by unchecking "Use a Google Map to set latitude and longitude" under "admin/config/content/location". It automatic enable geocoding on node add/edit page.

pearl.liang’s picture

Issue summary: View changes

Updated issue summary.

RWill’s picture

Issue summary: View changes
fyberoptik’s picture

Unfortunately #46 didn't work for me.

As a work around I followed the RTM path on the following link https://www.drupal.org/node/2108919

Bit more long winded.

snipebin’s picture

Applied patches linked on #46 while using module version = "7.x-2.9" and it worked for me; markers now show up in accordance to field settings.

Thanks @toughie!

trautmann’s picture

I had the same Problem. For me advagg-modifications-module was causing a problem.
Unchecking "Move all external scripts to the top of the execution order" fixed the problem for me.

Could it be, that gmap_markers.js is considert a external script because its stored in sites/default/files? Wouldn't it help to move that script to the module-folder?

rashad168’s picture

I face the same problem. with gmap version 7.x-2.11 and #49 fix my problem.

thanks @trautmann

hockey2112’s picture

THANK YOU #49. Worked for my site.

lamp5’s picture

A have got the same error with advagg 7.x.25 and gmap 7.x.11 with custom markers, i cant see any errors on my console, map is working but markers do not show.
Additional in my case i do not use advagg-modyfication

jos_s’s picture

#49 solved the problem for me too. Thanks a lot for sharing this solution!

Anonymous’s picture

Same problem here. #49 was not sufficient: I also had to uncheck "Remove empty JS files from aggregates" on the Configuration tab to make it OK. gmap_markers.js considered as empty by advagg ?!?!?

charlesj’s picture

Same problem here.
Fixed by unchecking "Remove empty JS files from aggregates" on the Configuration tab.

wylbur’s picture

For others finding this issue, we wanted to share our observations and solution.

Advanced Aggregation AdvAgg was the culprit, but we were able to resolve this conflict easily by disabling advagg on the page rendering the map. To do so:

- admin/config/development/performance/advagg
- under obscure options
- add the relative URL to the affected page

With this approach, no need to relocate files or disable empty JS file option as listed in comments above.