basic documentation needed
| Project: | gProximity |
| Version: | 5.x-1.x-dev |
| Component: | Documentation |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
This looks like SUCH a great module! Thank you for creating it.
I'm having trouble getting started.
* I don't understand the "gProximity key". I have a Google Maps API Key, which I've entered, but I don't see anything on Google's site for a separate "Locations" key or API. What is this second key, and where do I get it? (Also, in a separate bug, I noted that your instructions are linking to the site root, www.example.com, while I'm using this in a subdirectory, www.example.com/testdir . Is that causing any confusion for using the Google API Key? I've been seeing some error messages that the key isn't registered for my site, and I wasn't seeing them before installing Keys and gProximity.)
* What are the basic steps to setting up the module? First, enable the module; second, set Access Controls; then what? ... Do I add a View first, then visit Add gProximity? Or the other way around? Or something else?
* I don't understand the instructions "Go to Views and add fields to the gProximity type you wish to use for this page." I have a view defined, a Page view, set to type gProximity, with a handful of fields, including Location.Longitude and Location.Latitude. However, these don't appear on the Add gProximity page.
Is the missing gProximity key causing some of my other problems? I try to specify settings on the Add gProximity page, but when I click Save, I get
* Key for 'gProximity' @ 'www.example.com' doesn't exist. Go here to manage keys.
* Latitude field is required.
* Longitude field is required.
Thanks for any guidance you can give!

#1
I didn't think anyone would notice this so fast since I just committed the code to CVS yesterday. I'm still working on documentation and setup instructions but to help get you started I'll supply some quick instructions.
1. Install necessary modules and set appropriate permissions.
2. For setting up the Google Map API key with gProximity go to 'admin/settings/keys'. Specify the key given by Google in the Key field. Specify the domain name the key is good for (www.example.com) or just click the button labeled 'Set Domain to Current'. Select 'gProximity (Google Map Locations)' in the Service field and hit Submit.
Note: When acquiring a key from Google in concerns for sites using a base path such as www.example.com/testdir instead of just www.example.com, if you register www.example.com/testdir with Google the key will work for anything in www.example.com/testdir or deeper but not above or outside that location (www.example.com or www.example.com/diffdir).
3. Create a content type select one that already exists and add fields for Latitude and Longitude. This can be either separate CCK text fields or the use of another module such as Location. Location can generate the Latitude and Longitude. If you choose to use Location, enable both Location and Location Views modules. Edit the Location settings on the edit page for your chosen content type. Next go to 'admin/settings/location/geocoding' and select 'Google Maps' since you have already acquired a Google Map key you don't need a different one, then save. Next select 'Configure parameters' under 'Configure' and save the Google Map API key. Locations module is now setup.
4. Build a new View, I will only specify the gProximity required settings. Provide a page view with the view type of 'gProximity: Google Map Locations' and a URL. Disable Pager and set 'Nodes per Page' to 0. Add the fields you want, the only requirement is to supply Latitude and a Longitude fields. Set in Filters the 'Node: Type' to equal your content type. Set any other settings you wish keep in mind that this is just building the collection of nodes to provide to the map, then save.
5. Don't worry, you are almost done. Now go to 'admin/build/gproximity/add'. Select the view name if not already selected. To get the map up and running I will specify the minimum settings to apply on this page. In the fieldset 'Map Settings' then in fieldset 'Map Center', specify an initial Latitude and Longitude for the map to center on when loaded (you can generate one in 'Geocode Address' fieldset just under the Longitude field. Specify an icon for the markers under the fieldset 'Markers' and set the Latitude and Longitude fields to their appropriate field provided by Views. Now save and visit the URL for your newly created Google map.
I hope this helps you. If you come across any issues or if I was not entirely clear about something let me know. I will leave this issue open until I include documentation somewhere more accessible.
Note: Keys module is meant to provide keys dynamically for sharing code cross different computers/servers. For instance a development box vs. the live server and not have to worry about porting settings back and forth and forgetting to change the key back. The Service that is tied to the key is meant only for those modules that might require more than one key for a given domain. Keys also is meant to provide a single location for keys such as the Google Map API key for several modules so it is not required to input the one key in several different locations. I do plan on making Keys not required for gProximity in the future.
#2
Thanks so much for the wonderful, detailed reply!
I have downloaded the Apr 10 versions of both gProximity and Keys. I'm still getting errors with my GMap key.
So, two issues:
1) Key. I have Location installed, and if I turn off Keys and gProximity, my maps work fine and I don't get any error messages as I navigate around the site. With Keys and gProx on, though, I get frequent "The Google Maps API Key used on this web site was registered for a different web site. You can generate a new key for this web site at (the GMap URL)". Again
Also,
1a) I can't delete a Key. When I first used Keys, I set up a new key with
* my root url (www.example.com)
* my Google Maps key
* GMap selected as the service
Following your instructions above, I added a second key, with the same values for my root url and my Google Maps key, but now with gProx selected as the service. That didn't get rid of the error messages, so I though I'd try deleting the first one, leaving the second. Unfortunately, clicking the Delete link doesn't do anything.
2) Adding the gProx content. While your instructions above are very helpful, I still can't hook up the Lat and Long fields under Lat and Long (below Markers). I do, definitely, have lat and long fields (from Location) defined in my selected view, but there are no choices in these two drop-downs. Instead, they both say, "No fields available. Go to views and add fields to the gProximity type you wish to use for this page." Just to be clear, I did create a page view, I did specify gProximity Google Map Locations as the type, and I did add Lat and Long (along with node title and location address) to the view.
Here's an interesting thing: when I went to http://www.lookatsanfrancisco.com/lukat/admin/build/gproximity/add to add my new gProx, my view appeared in the dropdown - the view is called "prox", and it showed up in the list as "prox". When I went to edit it just now, though, the view shows up in the dropdown with parentheses - "prox()".
Also, now that I've updated to today's version, I CAN'T add a new gProx - I get "No views have currently been defined to gproximity. Go here to create a view with type gProximity."
Any further thoughts?
Let me know if you'd like me to break these out into separate bug reports.
And thanks again!
#3
Oops - serious user error. I AM able to use Keys just fine, generally. I had, in fact, entered the wrong key.
I was NOT able to delete or edit the existing keys, so I used mySQL to update the keys_manage table with the correct key values, and now I'm NOT getting the "Google Maps key" error message anymore.
I'm still having the other problems I described, though - I can't edit or delete the Keys on the Keys admin page, and I'm still getting the "No fields available. Go to views and add fields to the gProximity type you wish to use for this page." entries in the Lat and Long dropdowns.
Thanks!
#4
This is probably an issue pertaining to the base_path() with Keys and gProximity. I will look into this and supply a fix ASAP.
#5
A little off subject of this issue, your issue of deleting keys and some things not working on the gProximity settings page should be fixed in the next available dev snapshots for each Keys and gProximity.
#6
Hi James,
Much, much closer!
I am now able to select latitude and longitude fields, and actually view my gProximity-enabled view! It's excellent progress.
When I tried to view my view, though, I got dozens of these error messages:
warning: getimagesize(sites/all/modules/gproximity/markers/blue.png) [function.getimagesize]: failed to open stream: No such file or directory in example/sites/all/modules/gproximity/gproximity.inc on line 314.
In addition, when I try to go back and edit the gProximity profile I created (http://www.example.com/testdir/admin/build/gproximity/edit/## ), the setup form loads, but then it tries to load a google maps page (the status bar says "Read maps.google.com"), and it just never finishes loading, so I can't edit the setup profile.
AND, of course, I can't delete the gProx profile without deleting the view, which I don't want to do.
I recognize that these are new issues, and again, if you'd like me to create a new bug report for each one, just let me know.
Thanks so much for the quick work addressing my previous questions!
[edited to add: I am using the April 11 version of the dev upload]
#7
Yes, please create individual bug reports. That will help me keep track of them all and make sure I get them all remedied.
#8
I have followed these steps and I get the same issue as the other user here. Locations are added to the node type, new view made of gProximity, node type = content type, fields of latitude and longitude added. And the thing in gProximity still says "No fields avaliable.Go to views...."
The maps themselves work (I can display locations of these nodes on a gMap, so the Google Key must be in and working, right? It's just this proximity thing that I cannot get to work. whats wrong?
Thanks
#9
I am experiencing an error wherebyI have entered the keys and followed all of the step above. However, whenever i try to set the latitutude and longitude to center from a geocoded address in the UK and choose a marker, it doesn't work. I get error messages saying latitude field required, longitude field required and custom icon required. What I am doing wrong here...? I am stuck in a loop with this. I am working on a virtual machine, so it's all localhost stuff... Could this be the cause of my problems. I really want to develop this module and use it on my live site to help users find locations within a certain distance. I naturally assumed this would be the module to get that help!!!
#10
I am having this issue too.
I tried to add a gprox map. I went to: admin/build/gproximity/add
Filled out all the required fields and got this error message:
* Latitude field is required.* Longitude field is required.
* Icon field is required.
I think this has something to do with javascript. It seems that the form is not passing the values entered in those fields.
I noticed that the From doesn't remember values starting at "Map Center" and down. After I get the error message, all those values are reset to defaults.