Questions tagged [geolocation]

The Geolocation field type allows for SOQL queries based on location and distance. Functions DISTANCE and GEOLOCATION support distance and location-based SOQL queries.

Filter by
Sorted by
Tagged with
1
vote
1answer
242 views

How to refer Geolocation field type in visualforce page from custom object?

I am trying to refer Geolocation field type in visualforce page with InputField component, But it is showing the error. Vf page code: Note: here, Geo_Location__c is field name, object is object name ...
1
vote
1answer
455 views

Additional code for pushing geofencing messages

I just used the tool in marketing cloud to send a push message that a programmer wrote for us. At first, I successfully sent outbound messages to both iOS and Android. Then we asked him to implement ...
0
votes
1answer
323 views

Google Maps JavaScript API Usage Limits [closed]

I recently came accross an error in my production This page didn't load Google Maps correctly. See the JavaScript console for technical details. Upon looking into the console i found the below ...
0
votes
1answer
64 views

Manually override Geolocation Web to Lead API Value

We need to manually set/change the API Values of a Geolocation Field being used by web-to-lead. To populate the Geolocation field the web-to-lead form has the fields added like this GPS Location (...
-1
votes
2answers
320 views

Hi, I am trying Execute the following code in Visualforce page to get the current Location, But output is not coming. Please check & provide solution

Link of the code: http://www.aspsnippets.com/Articles/Get-Current-Location-Latitude-and-Longitude-using-JavaScript-and-HTML5.aspx Code: <apex:page> <script type="text/javascript" src="http://...
5
votes
1answer
1k views

Find nearest branch from ZIP code entered by customer

We need to calculate the distance between the ZIP code entered by customer and the nearest branch (Branch is an object) to that ZIP code address. The Lat and Long values are calculated for both ZIP ...
1
vote
0answers
182 views

Inaccurate coordinates on account fields

I'm experiencing inaccuracies on the longitude and latitude on the built in longitude and latitude fields in the account addresses. The inaccuracy is not just a rounding error, the results puts the ...
4
votes
1answer
101 views

Multi-Route Processing

Business Case I work for a non-profit that uses volunteers to deliver meals to their clients. Based on their volunteer-recurrence schedule, and the client's meal-recurrence schedule, each volunteer ...
3
votes
3answers
1k views

Is it possible to use the DISTANCE SOQL function without a GEOLOCATION field, or some other approach?

I want to make a SOQL call to "near me" filter the ACCOUNT records server-side. (Too many to bring down and filter on the client). It would seem that using DISTANCE function in the call would suit, ...
1
vote
1answer
177 views

How do I use Salesforce's Geocodes?

I've already activated "Clean Rules" Geocodes for Contact mailing Address in Salesforce. I understand from the links I've read that the geocodes don't actually show up unless through a custom field. ...
4
votes
1answer
373 views

Access DISTANCE SOQL Result in Visualforce

I am trying to access the result of a DISTANCE SOQL Query in visualforce but I cannot figure out how to do this. The correct values do appear in debugging. Below is my relevant code: Controller: ...
10
votes
3answers
6k views

can geolocation fields be used to calculate and display distance?

I have a geolocation field setup on an object and want to be able to display the distance from another location in miles on a Visualforce page. I see with the new geolocation fields you can use ...
1
vote
1answer
652 views

Geolocation with LockerService

A simple code getting current user geolocation is strangely ... ignored: it doesn't go to the success callback, neither in the error callBack, so I really have no idea of the cause. As window....
0
votes
1answer
299 views

Geo Location, Location based push messages not working

I have recently upgraded my Android and iOS Apps with new ET journey builder versions.Totally followed the Learning App, but location based push messages not functioning as previous. I can see ...
1
vote
1answer
3k views

SOQL UNION Operator workaround

I currently have a page where I query a custom object (Projects) to filter the results using the Distance formula(calculating distance between two addresses). I display these results using a standard ...
30
votes
1answer
3k views

What formulae does the Geolocation Distance use?

Forgive me if this is a bit extremely academic in nature, but I was wondering how Salesforce goes about determining the distance between two pairs of latitude and longitude? When I've looked at this ...
0
votes
1answer
345 views

Using Field Value in setEnpoint() URL

I am trying to send a request to a google api and I am using the following setEndpoint(): request.setEndpoint('https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+...
3
votes
3answers
847 views

Getting Lat and Long in SalesForce

I'm new to SalesForce and I'm working on an app that requires me to calculate distance between two given addresses. User enters 2 addresses and then I calculate the distance between those two ...
1
vote
0answers
361 views

Retrieving a User's Location from a GPS-enabled Phone in visualforce [closed]

I need to build a Visualforce page where a sales agent can see all his tasks and his current location on a google map. Now I know how to show the tasks as markers on a google map, but how can I ...
10
votes
4answers
559 views

Multiple Geolocation targets within a single SOQL query

Afternoon, I need to search for all objects within X miles of a set of known geo-located lat-longs. I've been looking at the geolocation features of SF but I don't see any mention of using multiple ...
3
votes
1answer
133 views

Live Agent Geo-location feature

Has anyone implemented a way to prevent users from initiating a chat if a visitor is coming from a country where customer has no presence using geo-location within live agent. Are their any best ...
3
votes
2answers
928 views

Get details of Image selected from <apex:inputFile>

I want to get the details of the uploaded image To choose Image I am using following code in VF <div class="form-group"> <label class="lbl">Image</label> <apex:inputFile value="...
0
votes
1answer
160 views

App is taking long time to open after restart the android device

Recently we have added the Geofence feature in to our app. After adding this feature, we have noticed the app is not responding for long time after restart the phone. This was only happening on ...
2
votes
1answer
876 views

Is it possible to use the setHeader method on HttpRequest Class to set the referer?

Using an Apex callout to Google Maps geocoding API, I want to authorize narrowly within Google to protect the client ID from being reused by anyone else. I believe the referer header needs to match ...
0
votes
0answers
70 views

Possible to show “nearby” campaigns on lead/contact by geo?

My goal is to show a list of related campaigns on a lead/contact profile that are "nearby" to the person based on their postal code. Ideally, I would add a custom field to the campaign object that ...
2
votes
1answer
680 views

How to deploy a Layout with a Related List containing a Geolocation field using ant/the Metadata API?

Using ant, when doing a retrieve() of a Layout containing a Related List, containing a Geolocation field (see abridged, sanitised example below), the relatedLists node contains two entries for the ...
3
votes
0answers
95 views

is it possible to fill address lead fields automatically with geolocalization from within salesforce1? [closed]

I would want customize my salesforce1 app so that we can add a new lead and auto-fill the address lead fields with a location button using the geolocation feature of my mobile device. Would it be ...
2
votes
1answer
213 views

Where can I find the Latitude__s and Longitude__s fields Or how to capture Latitude__s and Longitude__s via api

I am new in implementing and using the location fields . Need to know where can I find the Latitude__s and Longitude__s fields? Trying to bring this data from salesforce but cannot find what object ...
6
votes
3answers
261 views

SOQL Query to retrieve Contacts from an Account sorted by the distance between the contact location and the account location

I'm trying to create a SOQL query to retrieve Contacts from Accounts, with the contacts for each account sorted by the distance between the contact location and the account location. This is what I ...
1
vote
1answer
727 views

Update latitude and longitude through batch apex

When i run my batch apex latitude and longitude are not getting updated in customer object. i need to update 50000 record.. getting lat and long using google API i able to request 2500 record per IP. ...
1
vote
1answer
89 views

App error After restarting the device

I am using Et SDK 3.5.0, After I enabled the Geofence feature on the app, it will generate an error after restarting the device and opening the app. E/ERROR>>>﹕ Initialization did not ...
0
votes
1answer
79 views

Geolocation setup, for single -36.922970, 174.792207

We are wanting to use Geolocation in an effort to get physical address more precise at the account level, but it is split into Latitude and Longitude when you enter in the geocode which is erroring ...
5
votes
2answers
358 views

Detect the location of the user of web to lead

In web to lead, you can input any address that you want.I need to detect the exact location or just the state or city of the user who used the web to lead. Is this possible? any ideas how? Thanks in ...
0
votes
2answers
133 views

How to determine a Geolocation is within a buffer distance from another Geolocation using apex without using SOQL?

I have two location fields of type Geolocation named point1 and point2. I have one radius field . i need to determine whether point2 is located within radius distance from point1 or not. How can this ...
0
votes
1answer
669 views

how to determine a Geolocation is within radius distance from another Geolocation?

I have two location fields of type Geolocation named point1 and point2. I have one radius field of type Number(6,2). i need to determine whether point2 is located within radius distance from point1 or ...
7
votes
2answers
2k views

BillingAddress in query generate error

I have a query like below in an Apex Class in Sandbox. query = 'SELECT Id, Name, BillingAddress, BillingLatitude, BillingLongitude FROM Account WHERE Name = \''+ name +'\' AND '; query += '...
0
votes
2answers
126 views

how to submit a geolocation field via the API create command?

I'm starting out using the enterprise API for PHP with a simple create command... $createResponse = $mySforceConnection->create($insertArray, 'customobject__c'); My $insertArray includes a value ...
3
votes
1answer
4k views

How to display Location part of Address field type

Is there any way to display Geolocation part of Address field type in edit or display mode? Account object contains specific BillingAddress field of Address type (is in beta). Also, as mentioned here,...
2
votes
1answer
1k views

How do you get the lat/long of an apex:mapMarker that has been geocoded in Visualforce?

As of API 32.0, it's easy to create a map in Visualforce with <apex:map> and <apex:mapMarker> even takes string addresses as a position and will geocode the address automatically. You can ...
2
votes
0answers
319 views

Get user's Geolocation by capturing the IP address from the open made on the email

Is this possible in Exacttarget? Has anyone try this yet?
2
votes
1answer
79 views

geolocation when user logs in or logs out?

I am using the login flow which has been released as part of Winter'15 release. I would like to pass the geolocation of the logged in person (using javascript HTML5 Geolocation API) to visual flow as ...
1
vote
1answer
252 views

How to use what3words API in Salesforce to convert w3w address to coordinates

I am using what3words (http://what3words.com) to save locations in Salesforce, by simply copying the w3w address from their app and pasting it into Salesforce using the mobile app. I want to then ...
0
votes
1answer
2k views

Value outside of valid range when trying to save latitude/longitude on Geolocation field

This is the error I'm getting. System.DmlException: Insert failed. First exception on row 0; first error: NUMBER_OUTSIDE_VALID_RANGE, DC_geocode: value outside of valid range on numeric field: -117....
2
votes
1answer
1k views

returning distance in soql select

Has anyone found a way to use the DISTANCE function in a SELECT phrase. I've seen how to use it in the WHERE and ORDER BY clauses, but what I'm trying to do is something like... SELECT id, name, ...
3
votes
1answer
2k views

How to set geocode custom field?

I know how to set the Lat/Lng on standard Geocoding fields, but let's say I have Geocode__c on a custom object. Do I set the Lat/Lng by simply doing: CustomObjectInstance.Geocode__c.Latitude__c = ; ...
6
votes
1answer
2k views

Use GPS on a device to determine geolocation inside salesforce.com custom object

I've been looking for a way to capture the geolocation from a devices (iphone, ipad, etc) GPS and set the location value on a custom object. Looking to add an interactive google map or something to ...
5
votes
2answers
3k views

Calculating Map Driving Distance?

I have a salesforce geolocation field that i've put in coordinates. Is it possible to be able to get driving distance from that field? Or would i have to do it with google maps API? There was ...
3
votes
3answers
391 views

Geolocation in a List Controller?

I've successfully used geolocation in a list controller: public class NearbySiteProgramListCon { // ApexPages.StandardSetController must be instantiated // for standard list controllers public ...
0
votes
0answers
740 views

Visual force Error-System.TypeException: Invalid decimal

i have written code in apex while saving the Geo location in my detail page. While doing this an error is coming on this particular line.It throw an error on my particular this code newSupply....
3
votes
1answer
2k views

Enable VisualForce Map Component apex:map

I have found to my delight that there is now a standard map component. However, it is apparently not enabled for my org. How do I enable them? Is this feature still in beta? All the listed features ...