Geopointe

Creating URL Parameters

Using Geopointe's supported URL Parameters, you can configure custom buttons that pass information to the Map page and interact dynamically with your data. You don't have to be a developer to create URL parameters. This document will guide you in how to build them and includes some examples of powerful use cases:

Creating a URL Button

Start with the Map URL

When you are building out your parameters, you will always start with this simple URL that points to the Map page:

/apex/geopointe__Map?

Add Parameters

The parameters that you add will determine what is displayed on the map. After the first parameter, every subsequent parameter must start with a '&'(ampersand) and should include an operator and a value.

Note: Refer to the URL Parameters page for the full list of available parameters and their possible operators and values. 

Add to a Layout

We recommend deploying these dynamic map searches using a custom button placed on a Page or Search Layout. For guidance, follow these instructions for Creating a Custom Object Map Button - Simple URL.


Examples

Load a Location To the Map

Use basic parameters (id, routeid, center) to simply load a record, route, or coordinate location to the map. You can reference a specific record ID, or you can use merge fields to reference it dynamically. 

The URL below is used for the standard Geopointe Map button. It uses an id parameter, an operator (=) and a merge field of {!Account.Id} so that when it is placed on any record page, it will load that record onto the map:

/apex/geopointe__Map?id={!Account.Id}
 

Run a Nearby Search

To run a radial search (just like the Nearby search in the Map), you will add parameters that reference the data set ID (ds), distance range (range), and distance units (units). You must also include the the parameter &runRadialSearch=true whenever you are conducting a nearby search. 

The following URL uses these parameters to show nearby properties that are 10 miles from the starting Account record location: 

/apex/geopointe__map?
id={!Account.Id}
&runRadialSearch=true
&ds=
[DATASETID]
&range=10
&units=m


Note: Find the data set ID by editing the data set and clicking the Other tab. 

Run a Filtered Search

Using various filter parameters, you can specify the data that you want to include on the map. There are three primary filter parameters: the filter field (ff#), filter operator (fo#) and filter value (fv#). The following URL uses these parameters to display all opportunities with the stage of ClosedLost:

/apex/geopointe__map?
runentiredatasetsearch=true
&ds=
[DATASETID]
&ff1=Stage
&fo1=equal
&fv1=ClosedLost


In this example, the parameters are appended with the number ‘1’ because it is the first (and only) filter. If you added a second filter, they would be ff2, fo2, and so forth.


See Related Records On the Map

It's easy to load related records to the map using basic filter parameters. The URL below will load all Contacts associated with an Account. It references a Contacts data set and includes a merge field filter to show only those contacts where the AccountID field is the same as the Account record you are starting from. 


/apex/geopointe__map?
id={!Account.Id}
&runentiredatasetsearch=true
&ds=
[DATASETID]
&ff1=AccountId
&fo1=equal 
&fv1={!Account.Id}

You’ll notice that it includes the parameter &runEntireDataSetSearch=true. This is necessary when you want to run a full data set without a nearby (radial) search. 

Populate Lookup Fields

You can use dynamic "write back" parameters to update object fields with data that is passed to the map. 

The URL below loads a 10-mile radial search of Service Centers and uses "write back" parameters to let the user update a field on the Contact object with data from the results. In the second half of the parameter, it uses the wbRecordID and wbField parameters to update a field called Primary_Service_Center__c with that Service Center record. To execute the update action, the user will click a button called Update Service Center, which is defined by the wbbuttonText parameter.


/apex/geopointe__map?
id={!Account.Id}
&runRadialSearch=true
&ds=[DATASETID]
&range=10
&units=m

&wbRecordId= {!Contact.Id}
&wbField=Primary_service_center__c
&wbLookupObject=Service_Center__c
&wbbuttonText= Update Service Center
&wbredir=true