First off, thank you for what looks like a terrific module - the documentation looks very comprehensive, which one sees all too seldom!
Here's my question:
Take a look at http://nassaucountydems.com/dem_clubs
In https://www.drupal.org/node/2320261 you state:
The Getlocations_gps module provides browser based geolocation and can be configured to show a marker and can be added to just about any map.
This sounds like exactly what I'm trying to do. The desired functionality is for the user to be able to enter his/her address to see what district(s) they're in. I have this working (on a development site, not on the above) with SmartIP and you're right - SmartIP is dreadfully inaccurate and therefore unsuitable for this purpose.
I can't use Leaflet insofar as there's no provision for boundary labels, so I'm pretty sure it has to be OL. I don't see any GetLocations functionality exposed as a possible layer in OL, though, so how might I go about doing this? Is it possible with this module or am I barking up the wrong tree?
Thank you again for what you've done here and for your timely response on my other issue - any insight would be greatly appreciated!
Comments
Comment #1
hutch commentedI followed your thread on openlayers boundary layers, labels etc. Pity that it does not work with Leaflet which I've come to like a lot and which Getlocations supports. Getlocations_fields data can be presented using OL via the Views module, I have a demo here. I have only recently started looking at Openlayers, it has certainly moved on a lot from what it was a couple of years ago.
However Getlocations_gps won't work with OL, as it stands. I don't know how you would go about hooking into an Openlayers map and adding a marker using javascript. If you google for "openlayers html geolocation" you get a good many links so my guess is that it could be done. I also see that the openlayers module has a geolocate plugin under "behaviour" which you might be able to use.
Comment #2
bcobin commentedYes - I've seen it - and it makes me want to visit England even more than I already do! But what I really need to do is integrate the user-entered location into a map that displays boundaries - with labels - therein lies the rub.
Yes - I did get that working, but the geolacation from my browser indicated a location about three miles south of where I actually am. District boundaries are highly irregular, so the only way to get an accurate indication would be to manually enter the address and, even then, I'd include an advisory to double-check with the election board. Lastly, "following" the user around is kind of creepy, so a manually-entered address is the only viable solution, IMO.
Oh, well.
Thanks so much for taking the time and for your quick response - and my kudos for a great module - with great documentation! If you get any other ideas, please let me know, but in the meantime, thanks again and keep up the good work!
UPDATE: I think the below provides a solution - I've run into some speed bumps, but I think I can get this to do what I need.
https://www.drupal.org/node/2176513
Thanks so much for your help!
Comment #3
hutch commented