Salesforce introduces new tag in lightning framework "lightning:map" which can be used to securely displays map of one location or many locations.
You can either use address (make sure postalcode,country are specified) or geolocation (latitude and longitude).
Below is syntax to use lightning:map
<lightning:map
mapMarkers="{!v.mapMarkers}">
</lightning:map>
where mapMarkers is an array of marker to display location. Below is JSON sample for markers:
[{
"location": {
"Country": "USA",
"State": "CA"
},
"icon": "standard:account",
"title": "Western Telecommunications Corp.",
"description": "CA,USA"
},
{
"location": {
"City": "Lawrence",
"Country": "USA",
"PostalCode": "66045",
"State": "KS"
},
"icon": "standard:account",
"title": "Dickenson plc",
"description": "Lawrence,KS,66045,USA"
}]
If you know geo-location of address then, you can pass latitude and longitude in location as shown below:
[{
location: {
'Latitude': '37.790197',
'Longitude': '-122.396879'
},
title: 'Western Telecommunications Corp',
description: 'Western Telecommunications Corp',
icon: 'standard:account'
}]
I have created a sample lightning component which fetch account billing address and display it on google maps using Lightning:map tag.
You can either use address (make sure postalcode,country are specified) or geolocation (latitude and longitude).
Below is syntax to use lightning:map
<lightning:map
mapMarkers="{!v.mapMarkers}">
</lightning:map>
where mapMarkers is an array of marker to display location. Below is JSON sample for markers:
[{
"location": {
"Country": "USA",
"State": "CA"
},
"icon": "standard:account",
"title": "Western Telecommunications Corp.",
"description": "CA,USA"
},
{
"location": {
"City": "Lawrence",
"Country": "USA",
"PostalCode": "66045",
"State": "KS"
},
"icon": "standard:account",
"title": "Dickenson plc",
"description": "Lawrence,KS,66045,USA"
}]
If you know geo-location of address then, you can pass latitude and longitude in location as shown below:
[{
location: {
'Latitude': '37.790197',
'Longitude': '-122.396879'
},
title: 'Western Telecommunications Corp',
description: 'Western Telecommunications Corp',
icon: 'standard:account'
}]
I have created a sample lightning component which fetch account billing address and display it on google maps using Lightning:map tag.
Complete Code:
Note:
- If you specify address, then you must specify City, PostalCode, State or Country.
- If you specify both address and geo-location, then map will be plotted using latitude and longitude.
- If any mapMarker is invalid, then nothing will be plotted on map even other map markers.
Hope this will help!!!
Atocloud have designed solution to display all of its accounts on the google map for one of there clients in both lightning and classic, where user can select type of record he wants to search (Account, contact or any custom object). This solution has three section
ReplyDeleteBig data is a term that describes the large volume of data – both structured and unstructured – that inundates a business on a day-to-day basis. big data projects for students But it’s not the amount of data that’s important.Project Center in Chennai
DeletePython Training in Chennai Python Training in Chennai The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training Project Centers in Chennai
ReplyDeleteWow,nice information you posted here. Keep up the excellent work.
Html5 Training in Chennai
Html5 Training in Porur
Html5 Training in Adyar
best .net training institute in chennai
Best DOT NET Training in Chennai
.net training
Html5 Training in Tambaram
Nice blog!! I hope you will share more info like this. I will use this for my studies and research.
ReplyDeletePHP Training Institute in Chennai
Best PHP training in chennai
Ethical Hacking Course in Chennai
PHP Training in Chennai
Web Designing Course in Chennai
PHP Training in Chennai
PHP Course in Chennai
Atocloud have designed solution to display all accounts on the google map in both lightning and classic, where user can select type of record he wants to search (Account, contact or any custom object).
ReplyDeleteI would definitely thank the admin of this blog for sharing this information with us. Waiting for more updates from this blog admin.
ReplyDeleteSalesforce Training in Chennai
salesforce training institute in chennai
Web Designing Course in Chennai
Tally Course in Chennai
ReactJS Training in Chennai
microsoft dynamics crm training in chennai
Salesforce Training in Chennai
Salesforce Training in Chennai
Started out in 2012, Data Science Central is one of the industry’s leading and fastest growing Internet
ReplyDeletecommunity for data practitioners. Whether it is data science or machine learning or deep learning or
big data, Data Science Central is a one-stop shop that covers a wide range of data science topics that
includes technology, tools, data visualisation, code, and job opportunities. Also, many industry experts
contribute to the community forum for discussion or questions.
DATA SCIENCE Training in OMR Chennai
This is great blog!!! Nice content.
ReplyDeleteweb designing course with placement
php mysql course in chennai
magento 2 course | magento 2 training
We have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends. what county am i in now
ReplyDeleteI was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. garmin gps updates free 2016
ReplyDelete
ReplyDeleteYou write this post very carefully I think, which is easily understandable to me. Not only this, but another post is also good. As a newbie, this info is really helpful for me. Thanks to you.
Tally ERP 9 Training
tally classes
Tally Training institute in Chennai
Tally course in Chennai
ReplyDeleteThis content of information has
helped me a lot. It is very well explained and easy to understand.
seo training classes
seo training course
seo training institute in chennai
seo training institutes
seo courses in chennai
seo institutes in chennai
seo classes in chennai
seo training center in chennai
Myra Condo by Selangor Dredging Berhad. Hotline 61009266. Get Discounts, Direct Developer Price, Brochure, Floor Plan, Price List. Upcoming new launch at Potong Pasir Myra Condo
ReplyDeleteIn the same way as other ventures, the guide business is experiencing a time of solidification and change. Fókuszpályázat
ReplyDeleteHello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. where to get nonsurgical cci treatment
ReplyDeleteI experience considerable difficulties my contemplations on substance, however I truly felt I ought to here. Your article is truly awesome. I like the way you composed this data. maps128
ReplyDeleteReally I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. this page
ReplyDeleteIn this manner, the main interest and supply factors for business endurance and development - i.e., stable client and stable business visionary - are emphatically connected with business location. find more
ReplyDeletePretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info. бонгакам
ReplyDeleteAivivu - đại lý chuyên vé máy bay trong nước và quốc tế
ReplyDeletegiá vé máy bay đi Mỹ khứ hồi
vé máy bay đi sài gòn hôm nay
vé máy bay đà nẵng hà nội tháng 12
giá vé đi nha trang máy bay
giá vé máy bay đi Huế
bảng giá taxi sân bay
combo du lịch đà nẵng
There is nothing worse than feeling uncomfortable and it seems problems can worsen when there are occasions you wish to attend. With Christmas looming make sure you make the most of the holidays by having any neck or back pain problems looked at before symptoms worsen. There are specialist chiropractors within Coventry that offer consultations, diagnosis and treatments to ensure you are provided with the best care. click here
ReplyDeletecan u please send the code for based on latitude and longitude display location in google maps for custom object please send the code or any reference for this
ReplyDeleteYou have been bombarded with unidentified contact numbers and inspire bordering on harassment. You would like to find information about the identity of the person behind a telephone number. You can find solutions. call history tracker
ReplyDelete