Closed (fixed)
Project:
Device Geolocation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2010 at 08:07 UTC
Updated:
6 Aug 2012 at 04:41 UTC
If an anonymous user visits a Drupal web site that has User Location turned on, Device Geolocation should provide the users location data such that Views and other features which use the Users Location will take the user's location from Device Geolocation. Example:
1. User visits web site anonymously on a mobile device
2. User is prompted "Website wants to use your location"
3. User says "Allow"
4. Web site has a view that integrates with User Location
* Web site displays content specific to the anonymous users location. Wow!
-alternately-
Expose Device Geolocation data to Views to support a scenario as above.
Fantastic module, by the way!
Comments
Comment #1
tronathan commentedI was able to hack this into Views for Sorting using the following:
Origin: Use PHP code for latitude, longitude:
http://img.skitch.com/20101227-q58t3ny2ni5y9te5j3fd3d37c5.jpg
Comment #2
arpeggio commentedYes, we can use that code with the Views and Location modules installed. Thank you for sharing.
BTW, you refer a "User Location" in your first post. Is "User Location" a module? I have searched Drupal and I can't find "User Location" project...
Comment #3
jenna.tollersonUser Locations is dependent on Location and is included with the Location module download.
Comment #4
arpeggio commented@jenna.tollerson thank you for the info. Some useful links related to this thread:
http://drupal.org/node/944284#comment-4392574
#1253460: Smart ip patch for views location proximity fitler
Comment #5
ankit.goyal5 commentedHi tronathan,
I am not able to locate the link where i need to past this code.
I have smart ip, location module enabled.
I am getting the value of location of user through ip but, it depends on the user.
Once the user come to my site as per Smart Ip module it will ask user to share his location.
once he will do that and refresh the page the local weather will come.
but i want to fetch user location dynamically, i dont want to ask for share location.
at the time user come to see site the local weather needs to come
Please help me...
Comment #6
arpeggio commentedHi agoyal5, the Smart IP/Device Geolocation has a feature where you can list pages that will not ask to share user's location. At your Smart IP admin page there is textarea with label "Ask user's geolocation on specific Drupal native pages", you can list the pages that you don't want to ask to share user's location. Thanks.
Comment #7
ankit.goyal5 commentedThanks Arpeggio.
i have seen that admin page looks promising.. but
will it take location automatically then.... my server is in maintenance up to some days, so i cant check it.
on the pages where is no sharing and if it will take it automatically then it solve my problem...