---
schema_version: "1"
id: a7cbe5865196cbc4d3c1809618c497085bff3ce9db6bd03ba9709c6a2ae138f7
title: Add a Method to Launch Google Maps
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/add_a_method_to_launch_google_maps.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.add_a_method_to_launch_google_maps.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ce62b282064fece328efa5f6821c16864b834475549b5e8212743d0e107bfb46
description: In your Consumer Goods Modeler workspace, add a method to the Display module to launch a third-party app from the Consumer Goods offline mobile app. Sales reps can tap the maps app launch button in CG offline mobile app to launch apps such as Google Maps. Customize the business logic method to pass the latitude and longitude parameters, so that sales reps navigate to the correct coordinates.
products:
  - Consumer Goods
release: "264"
---
# Add a Method to Launch Google Maps

In your Consumer Goods Modeler workspace, add a method to the Display module to launch a third-party app from the Consumer Goods offline mobile app. Sales reps can tap the maps app launch button in CG offline mobile app to launch apps such as Google Maps. Customize the business logic method to pass the latitude and longitude parameters, so that sales reps navigate to the correct coordinates.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d20336e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d20336e63 ">To add a method to launch Google Maps:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d20336e63 ">CG Cloud Developer, Admin</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_vscode_modeler-264-0-0-production-enus/87cab158-9245-45b0-9080-f17a57d69ec9/images/icon_note.png)

Note If you’re a Salesforce developer or a partner developer, make sure you don’t pass any sensitive information to the third-party app.

1. To create a business logic method to open Google Maps, open the VS Code terminal, run `sf mdl add`, and enter these details.
    
    ```
    ? Select the resource you want to add: businesslogic
    ? Specify a name for the business logic: NavigateTo
    ? Select the module to which the NavigateTo business logic is added: MyDisplay
    ? Select a suitable option for the NavigateTo business logic: async method
    ? Select the reference object to add the business logic method: BoMyDisplays
    ```
2. In the customization range of the new business logic method, enter this code.
    
    ```
    var customer = me.getLuCustomer();
    let latitude =0;
    let longitude= 0;
    if (customer) {
      latitude=customer.getLatitude();
      longitude=customer.getLongitude();
    }
    const url = `http://maps.google.com/maps?mode=d&daddr=${latitude}+${longitude}`;
    var promise = Facade.startThirdPartyAsync(url,{});
    ```
3. Save your changes.
4. Build your contracts to check for validation errors. Run `sf mdl build`.