| layout | module |
|---|---|
| title | Module 2: Setting Up Your Environment |
In this module, you set up your environment to enable Lightning App development.
- Enable Lightning Components in your Salesforce org
- Install Custom Component
- Configure custom geolocation field for Contacts
-
In Setup, click Develop > Lightning Components
-
Check the Enable Lightning Components checkbox
-
Click Save
- Copy and paste the URL http://bit.ly/InstallComponent into the address bar of your browser
- Select Continue on the Package Installation Details screen
- Select Next on the Approve Package API Access screen
- Select Grant access to all users on the Security Level screen.

- Select Next
- Select Install
##Step 3: Add Custom Field to Contact Page Layout
- Go to Setup | Build | Customize | Contacts | Page Layouts
- Select Edit next to the Contact Layout on the last row

- Drag the Location field from the upper tray of available fields and drop it into the Address section of the page layout.

- Click Save
##Step 4: Create Sample Contacts with Locations We are going to create new contacts in our Salesforce environment and populate information into the geolocation field included in the package we just installed. This will allow our component to map the location of the contacts in our final Lightning App.
- First, open a new tab to www.google.com and look up the Latitude and Longitude of the city you are currently in. Most major cities will automatically show the coordinates in the front page of your google search.

- In your Salesforce tab, navigate to the Home tab.
- In the left navigation of your salesforce home screen, select the drop down for Create New Contact

- Make up any contact name you would like, and scroll down the page to the address area, where you will see the Latitude and Longitude fields. Enter the Latitude and Longitute numbers from your google search into the fields on the new contact, omitting the N and W. The Latitude will be the first resulting number in your google search, and the longitude the second number.

- Click Save
- Create 2 more contacts with locations near your main city.
- Extra Credit Look up the coordinates for a city 500-1500 miles away from your current location, create some contacts with coordinates in those other locations as well.
