You need to sign in to do that
Don't have an account?
Ravi Dutt Sharma
Issue with lightning:map
Winter 19 release has brought this new tag - lightning:map to show google maps in lightning maps. I am trying to implment below example in my dev org, but the map marker is not showing up on the org.
Example given here:https://developer.salesforce.com/docs/component-library/bundle/lightning:map/example
When I check the broswer console, I can see below error:
util.js:218 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
lw.j @ util.js:218
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:183
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:76
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:73
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:76
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:164
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:76
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:164
Ee @ js?key=&callback=LightningPrimitiveMap.init:75
Ae.xa @ js?key=&callback=LightningPrimitiveMap.init:164
(anonymous) @ stats.js:1
util.js:218 Google Maps JavaScript API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
Question1: Do we need to explicitly add google map api key? Only then the map would work? I am assuming that Salesforce should automatically take care of this?
Question 2: If the answer to above question in yes, then how do we add the api key? I have a developer key, but not sure how to add it.
Example given here:https://developer.salesforce.com/docs/component-library/bundle/lightning:map/example
When I check the broswer console, I can see below error:
util.js:218 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
lw.j @ util.js:218
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:183
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:76
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:73
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:76
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:164
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:76
(anonymous) @ js?key=&callback=LightningPrimitiveMap.init:164
Ee @ js?key=&callback=LightningPrimitiveMap.init:75
Ae.xa @ js?key=&callback=LightningPrimitiveMap.init:164
(anonymous) @ stats.js:1
util.js:218 Google Maps JavaScript API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
Question1: Do we need to explicitly add google map api key? Only then the map would work? I am assuming that Salesforce should automatically take care of this?
Question 2: If the answer to above question in yes, then how do we add the api key? I have a developer key, but not sure how to add it.
If this has solved your problem then please mark this as best answer.