In this blog, I would explain how to implement Google Map in scala .js. If you are developing your web application in Scala and you want to write javascript functionality in Scala then you should go with scala.js.
To implement Google Map in scala.js, please follow below steps:-
1) Add below code in your HTML file
2) Add below function in your Scala class file
3) Call initialize
function in your HTML file.
For complete source code, go to https://github.com/knoldus/ScalaJs_Weather_Report
I have create a type safe scala wrapper for the google maps api. You can find the source for it here.
https://github.com/coreyauger/scalajs-google-maps
Thanks 🙂