so i want to use gmap locations, love the custom marker controls and all of that - but i do *not* want to use this for "user locations" or have the 'location field' show as an input option in core user profiles (because i'm using them elsewhere in a location enabled content profile for users, custom nodes and so on)
is there an easy way to just not use the users-piece of gmap locations that is specific to users (remove input fields from user profiles, etc, remove the maps/users page and so on)
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | locationempty.jpg | 102.5 KB | yesct |
| #14 | locationempty-zoomin.jpg | 121.19 KB | yesct |
| #13 | zillas.jpg | 98.26 KB | yesct |
| #13 | mapofmeetingsview.jpg | 109.51 KB | yesct |
| #13 | nomap.jpg | 26.54 KB | yesct |
Comments
Comment #1
zilla commentedanybody know about this? is this a non-configurable option - like if i enable this module then i *must* accept that location fields appear in user profiles in core?
Comment #2
zilla commentedsorry, i'm a twit...logged in as admin so didn't realize that user permissions control this for users..duh.
Comment #3
yesct commentedsounds like you figured out why you couldn't... but I'm having the same original problem... but I suspect a different solution...
I use a custom cck content type and use that as the "profile" instead of the standard... and in the profile content type, I add a location cck field...
but how do I generate a map showing the location of all users using that cck field? Do I do it through views, through a location admin menu? through gmap?
I'm lost and need a little bit of documentation/tutorial/hints. Thanks!
Comment #4
zilla commented@yesCT - i am doing exactly this, here's how:
use "Content Profile" for the profiles that have all of this CCK stuff in it (the CP module has advanced features for handling integration with core profile, including - in latest dev release - a nice little 'edit user profile' when a user clicks on 'my account'
using views, create a page with a view type 'gmap' and then filter by content type "user profile" (or whatever you've called it) and it will summon the location entered (if the user has filled it out - remember that you must also first go into the content type and 'location enable' it by allowing 1 locaiton field to be entered)
in the same view, pick what you want to appear in the pop (if you've set gmap to show a popup info box instead of 'linking to node' when clicked)
i'm using title of profile, username, street address and user picture and have it set to popup info box on the map, and the title is clickable bringing the clicker to the profile OR he can click the 'name of hte user' and go to the same sort of page (semantics, it's user/* instead of member/* - but using content profile, you can set hte 'profile' to also appear in full form under 'user')
now, when you click on the user map, you see little pins for all users, and when you click on a user profile, you also see a little location cck widget that shows just that user on a tiny map in a block...
(some screenshots attached)
here's the view in case you want to import it (though you'll need to check for anything that doesn't mirror your own set up)
Comment #5
yesct commentedthanks so much for taking the time to write this down! I can't wait to try it! Thanks!
Comment #6
yesct commentedOpps silly phone posted twice... I'll let you know how it goes....
Comment #7
yesct commentedzilla: so I went to go try it out... And I don't have a gmap option when ading a view. So I looked under the settings for view, gmap but could by find anythig like enable gmap view. What am I mssing? Thanks a ton!
Comment #8
zilla commentedthat's strange - i'm not sure why you're not seeing the view - are all gmap modules enabled as well as location for the content type?
Comment #9
yesct commentedI did some screen captures on my modules admin and my views add page... I'd really appreciate someone taking a look. I'm stumped as to why I dont have a gmap type when I add a view.
the readme talks about a gmap_views.module ... but http://drupal.org/cvs?file=/modules/gmap/gmap_views.module says that file should not be there... hmmm
Comment #10
zilla commentedoh, you're looking in the wrong place!
select 'node' as view type, and then when you're editing the view for the page (or default) you'll see the style option where you can normally pick list, table, etc - one of those will be gmap - it's *inside* the node view as a style option for display: (from view above)
$handler->override_option('style_plugin', 'gmap');
Comment #11
yesct commenteddoh! I'll go try it. -C
Comment #12
yesct commentedOK, I found the "gmap" style setting! But... when I go to the page to view my view (ha) it is just an empty page... the header, and left and right, footers of my site are all there, but the content is empty... not an empty map -> just no map. The odd thing to me, is the page view of the same view that uses the "list" style setting DOES show my nodes (all be it, it for some reason lists one node multiple times!) .... So, is the GMap style view, just not seeing the cck location fields?
I'm perplexed and frustrated! :) But dedicated to sorting this out!
I wonder if I set up a blank install and did step by step a tutorial to get a gmap view working if I would then see what I need to do to get it working on my data/site?!? If you know of such a tutorial, please let me know.
Here is my view if it might help you see where I have gone wrong:
Comment #13
yesct commentedzilla, I was looking at your view... and it looks like you have added fields differently than I have... My content type "meeting" has a field that is of type location...
I attached some screen shots showing my content type, and showing the difference in the way your view looks in the view edit, and the way my view looks ... check out the "fields" part...
I wonder if I somehow need to access the specific location fields that are in my location cck field...
Comment #14
yesct commentedI'm thinking this is the issue:
my location cck field is listing ok, but the "Location:blank" "field" in the "view" comes out zero...
I attached a screen shot showing the location info comes up ok, but not the "Location:..." field. (it also shows that node listed twice... which is weird).. and I also attached a zoom in on that screen to see the important bits better...
Thanks a ton!
Comment #15
yesct commentedI noticed my filter for lid was set to empty.. when I set it to NOT empty, then my list of nodes in the view goes to zero... which is not what I want... It is like, I need to tell it to load the location info for the location cck field that is in the node... it is NOT using the location info of the nod it's self ...
Comment #16
yesct commentedI'm wondering if this is related: http://drupal.org/node/334993 (they are also getting the style "list" to work, but the style "gmap" is blank...
And, I'm thinking that I am far enough away from the original problem to start a new issue:
http://drupal.org/node/338300
But, if I am off base, please let me know! Thanks a ton!
Comment #17
zilla commentedinteresting - the BIG difference between our approaches is that i've simply location enabled the content type but i am *not* trying to use location cck - i found it to be a bit buggy for me (wouldn't show street or any of that)
if you simply location enablethe 'member profile' by editing the content type and adding in locative info, it will present that to the user but will in turn not allow you to embed into the node like a field, but rather as a block (that's what i'm doing,i kind of like it that way actually because of the theme block styling)
that means in my view i'm not reffing any location cck to push data into gmap, but rather the location that is in the node itself - which automagically populate the node
you might try quickly removing location cck from the node type and make the view the same but without it, location enable the content type, go back and edit the location fields again and save and then retry the view...(does that make sense? i'm rambling...)
Comment #18
yesct commentedit totally makes sense and is in line with my current thinking on why this doesnt work! :)
I'm just trying to think about what this change from using a cck field to using location on the node would imply for other stuff... :)
Comment #19
zilla commentedwell, you can still access location for the node in views (all fields, street, city, etc), so no distinct benefits that way - the real benefit of cck is manipulating placement within the node - but certain themes may alrady offer a block region that lets you simulate that OR you could do a custom page theme....
Comment #20
yesct commentedmy grasping at straws idea: is to keep my cck location field (because it is working really nicely with my contemplate pages), but ...
enable the location on the node directly by setting the min and max num of locations on my content type to be 1, and then writing code in contemplate that will SET the location info there to be a copy of whatever it is in the cck field... It is totally crazy! because I dont even know if I can "set" the info like that, and it would "set" it every time the page is viewed (yes?) which is a lot of extra work, as it should only be set when the node is edited, not viewed... but ...
the upside is, I know that gmap would work to map the nodes that way, my nice contemplated pages would still look pretty, and I only have to change the location info in one place (in the cck location field) ....
I dont even mind trying to do it a different (and probably the "right" way) by writing the code to get the cck location fields to work in views/with gmap, but I'm just at a loss for where to start.
Thanks for listening! :)
Comment #21
drewish commentedOver on #338587: Move views integration code to gmap_location module? there's a patch to add latitude/longitude field selection options to the gmap style plugin. If your view can display the lat/lon then you can use it to put them on the view.
update: I'd originally used the wrong issue id.
Comment #22
drewish commentedYesCT, you also might be interested in taking a look at: #347030: location_cck needs a views relation. I've posted a patch that adds a views relation so you can join the location into the views.
Comment #23
yesct commentedsounds promising!!! I'll go look. Thanks a ton.
Comment #24
johnvThis is already a very old issue. Is it still relevant?