GMap Views does not set markers (but map/node does)
| Project: | GMap Module |
| Version: | 5.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Hi,
I hope I am not repeating another issue, also hoping to have fully understood what to do and it really is a bug:
I have set up a view. It provides a page and a block. Both page and block have the GMap View type selected. Next I selected location module's latitude and longitude fields in the fields area of views. In the filter settings I have: published = yes and selected a couple of node types ("is one of") from content types that have locative information.
Now: when I go to map/nodes I do see all the locative information set neatly in a Google map. However, if I use the Gmap View at either the block or the page from my view created above, I do only get a map but no marker in it.
When I look at the output, I see that it has the LINKS to the actual content that uses locative information, but does NOT add lat and lon as expected. Please compare these outputs:
Output from "map/node";
<script type="text/javascript">
/* <![CDATA[ */
Drupal.extend({ settings: { "gmap": { "nodemap": { "width": "100%", "height": "400px", "zoom": 5, "controltype": "Large", "align": "None", "maptype": "Hybrid", "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "behavior": { "locpick": false, "nodrag": 0, "nokeyboard": 1, "nomousezoom": 0, "autozoom": 0, "dynmarkers": 1, "overview": 0, "notype": 0, "collapsehack": 0, "scale": 0, "fatmarkers": false }, "markermode": "2", "id": "nodemap", "longitude": "-120.3662109375", "latitude": "37.47485808497102", "markers": [ { "link": "/regionen/los-angeles-county", "latitude": "33.938803", "longitude": "-118.413391", "markername": "big red", "opts": { "title": "Los Angeles County" } }, { "link": "/regionen/san-diego-county", "latitude": "32.705845", "longitude": "-117.206268", "markername": "big red", "opts": { "title": "San Diego County" } }, { "link": "/regionen/shasta-cascade", "latitude": "41.409036", "longitude": "-122.197194", "markername": "big red", "opts": { "title": "Shasta Cascade" } } ], "querypath": "http://dev.california-reporters.de/map/query" } } } });
/* ]]> */
</script>Output from my Gmap View:
<script type="text/javascript">
/* <![CDATA[ */
Drupal.extend({ settings: { "gmap": { "view_gmap": { "width": "100%", "height": "500px", "zoom": 5, "controltype": "Large", "align": "None", "maptype": "Hybrid", "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "behavior": { "locpick": false, "nodrag": 0, "nokeyboard": 1, "nomousezoom": 0, "autozoom": 0, "dynmarkers": 1, "overview": 0, "notype": 0, "collapsehack": 0, "scale": 0, "fatmarkers": false }, "markermode": "2", "markers": [ { "link": "/regionen/shasta-cascade" }, { "link": "/regionen/los-angeles-county" }, { "link": "/regionen/san-diego-county" } ], "querypath": "http://dev.california-reporters.de/map/query", "longitude": "-120.3662109375", "latitude": "37.47485808497102" } } } });
/* ]]> */
</script>You see it has the links in it, but there is no latitude and longitude provided for these links - most obviously this is why display of any markers fail here...
What might have gone wrong?

#1
I have the same problem :( at node locations: the latitude and longitude information shows up in the source code together with the markers, but if you have it as a page or a block via Views module, it doesn't show up, even on the source code. Any workaround on this bug?
#2
OK...all working now with the new release of GMAP yesterday October 10!!! YEHEEEEEEEEEEEEEEEEEEEEEEEEEYYYYYYYY
#3
Node locations map works great.
Views page of one taxonomy term shows the following: a single marker over a completely-zoomed-in map, but with the message "We are sorry, but we don't have imagery at this zoom level for this region ..." But I'm zoomed all the way in.
Here's the code from the page.
/* <![CDATA[ */Drupal.extend({ settings: { "gmap": { "view_gmap": { "width": "100%", "height": "280px", "zoom": 16, "controltype": "Large", "align": "None", "maptype": "Hybrid", "line_colors": [ "#00cc00", "#ff0000", "#0000ff" ], "behavior": { "locpick": false, "nodrag": 0, "nokeyboard": 0, "nomousezoom": 0, "autozoom": 1, "dynmarkers": 0, "overview": 0, "notype": 0, "collapsehack": 1, "scale": 1, "fatmarkers": false }, "markermode": "2", "markers": [ { "link": "/node/169", "opts": { "title": "Chapel" } } ], "querypath": "http://www.batesnow.net/map/query", "longitude": "-70.20383834838867", "latitude": "44.10616964775268" } } } });
/* ]]> */
#4
I have the same problem as panatlantica and arlenef.
Any idea ?
#5
Hi,
I have downloaded the latest version to go with Drupal 5. Have done exactly the same as the original post, setup nodes with location information in, set-up a view, and I get nothing. It may be me being completly dense. This seems to be a bit of an issue for several people. If anyone has this working, would you be kind enough to put a step by step guide on how you achieved it? Then I (and others) can check to see what we are doing wrong, if anything.
Regards,
Nick
#6
Yes, I totally agree with nickbits.
Arlenef, is it still working for you? Do you (or anyone else) have an idea of what might be wrong for the rest of us?
Help is appreciated to solve this issue :)
#7
My problem is the same as panatlantica, arlenef, and BobLouis.
A problem with the gmapviews module?
I'm sending a message to the maintainer, bring attention to this node.
#8
I can reproduce similar over here.... Looking into it...
#9
Quick glance into the code, it seems I did something silly in the last commit. When markermode is 2, I'm neglecting to set up the marker properly.
Fix in a moment...
#10
Fix committed, will be in next snapshot. Thanks for the report!
#11
Thanks for following up!
#12
I uploaded the new gmaps 5-1.x dev (dated 10/23 at drupal.org, but showing other packaging script dates) and location modules ... and am still having problems.
Summary: I've geocoded locations for one vocabulary, and a gmap is showing up on each node.
However, in the view I've created, a single top left marker shows using GmarkerManager, and nothing using using Clusterer.
Is there a tutorial for setting up a view for Gmaps? I'd be happy to check and see if I've got something wrong in my View. Here is the view export.
$view = new stdClass(); $view->name = 'campus_places'; $view->description = ''; $view->access = array ( ); $view->view_args_php = ''; $view->page = TRUE; $view->page_title = 'Campus places'; $view->page_header = ''; $view->page_header_format = '1'; $view->page_footer = ''; $view->page_footer_format = '1'; $view->page_empty = ''; $view->page_empty_format = '1'; $view->page_type = 'gmap'; $view->url = 'campus-places-map'; $view->use_pager = FALSE; $view->nodes_per_page = '0'; $view->sort = array ( ); $view->argument = array ( ); $view->field = array ( array ( 'tablename' => 'node', 'field' => 'title', 'label' => '', 'handler' => 'views_handler_field_nodelink', 'options' => 'link', ), array ( 'tablename' => 'location', 'field' => 'latitude', 'label' => '', ), array ( 'tablename' => 'location', 'field' => 'longitude', 'label' => '', ), ); $view->filter = array ( array ( 'tablename' => 'term_node_7', 'field' => 'tid', 'operator' => 'OR', 'options' => '', 'value' => array ( 0 => '437', 1 => '440', 2 => '439', 3 => '438', ), ), ); $view->exposed_filter = array ( array ( 'tablename' => 'term_node_7', 'field' => 'tid', 'label' => '', 'optional' => '0', 'is_default' => '0', 'operator' => '1', 'single' => '1', ), ); $view->requires = array(node, location, term_node_7); $views[$view->name] = $view;Help!
#13
Thank you, bdragon!
I am new to development versions of modules, and I now know to wait for the new version to be packaged. Working great now!
#14
Hello, I still have the same problem, exactly as described by jiangxijay: a single top left marker, that's it...
I am also using the version published on Oct 23.
Can you please clarify: is this issue going to be solved in a next version, or was it due to be solved in the "Oct 23" version?
Cheers!
#15
Same issue. Was working before, page view source shows that the node data is available for the map, but nothing shows up.
Note to self: check issue queue before updating to latest dev...
Bdragon, if you can give more of a hint as to where the issue is, what changed -- I'm lost in so much JavaScript -- I could help try things and patch.
Thanks,
ben - http://dev.wsf2008.net/ - yeah, it's time sensitive for us...
#16
Turning off marker management allows the markers to show up.
It seems to us that the amount of time it takes the markers to render is markedly increased with managing turned off though.
ben, Agaric Design Collective
#17
Benjamin, are you sure you had the exact same issue as the one mentioned in the original post (+posts 1, 3, 5, 12...), that is:
1. Maps on .../map/node or /map/user display the markers correctly, BUT
2. Maps generated with Views (either using page or block) do not display the markers... at least I still have the problem, even with marker management turned off.
So do you confirm that you can see the markers on a gmap generated with Views? If so, can you "export" the code of your generated View (/admin/build/views/carte/export) ?
#18
Downloaded the last version (2007-Nov-06), and it works now: markers are displayed correctly!
Thank you bdragon :)
#19
I thought an address would be enough to get markers. It seems that I must have Lat and Lon in the location fields or I don't get markers. I was working with another cms that automatically inserted Lat and Lon after typing in an address. Can Gmap use the address when no lat and lon is in the data table and then update the lat and lon when or if received from google maps?
#20
Hello can anyone confirm if they have this set up working properly?
GMap Module 5.x-1.x-dev (2007-Nov-09)
Drupal 5.3
location (API, module) 5.x-2.7
Mine was all working until I upgraded to the GMap Module 5.x-1.x-dev (2007-Nov-09) version of Gmaps.
There are two problems:-
- Blocks are not recentering or zooming in on the markers
- Geocoding for uk postcodes is slightly off by a few roads
#21
I have the same exact problem as you. I cannot see the markers on my map unless I add the lat and long values. Can anyone help?
#22
I uploaded the new gmaps 5-1.x dev (dated 10/23 at drupal.org, but showing other packaging script dates) and location modules and when I use Gmap macro maker I can not add info to the markers I place on a map. Is there some additional settings that I need make sure are set?
I can use macro maker and past the code into other nodes the map markers are there but are renumbered always missing the first number, i.e., if I have an A, B, and C marker it will show as B, C, D on the map after I past the code into my page and I cannot add any info on the markers.
here is some sample Macro code that I generated from the GMap Macro Maker:
[gmap markers=letters::42.954412331213284,-89.2584228515625 + 42.829652952249425,-89.05242919921875 |zoom=9 |center=43.078919299859656,-89.373779296875 |width=500px |height=500px |id=macro_map |control=Small |type=Map]
#23
the gmap modul worked in my side for more then 3 month and it worked correctly in my opinion. since last week only the map shows up and the markers no more. i use not the gmap view, i use the map/node
i read a lot of comments here but cant find any solution for me. now i tried the 5.x-1.0-alpha1 version but nothing happens. still the markers dont come up.
i dodn't know what to do. i need help.
link: http://myclimb.de/map/node
thanks
r.
#24
I followed Benjamin's advice from further up the page and turned off Google marker managment. As soon as I did, I got markers back, albeit without the nice little info bubbles.
I can't compare a view to map/node because for me map/node is a 404 right now. =(
#25
I'm also having the same issue with gmaps 5.x-1.0-alpha1. Upgraded to 5.xbeta1 with no change. map/node works just fine, but views of maps refuse to show makers, at any zoom level, with or without marker managers, or anything else I can think to try.
Is this the old issue resurfaced, or a new one?
Jen
#26
This issue is pretty muddled, I'm going to suggest filing a new issue.