How to call Javascript code from ScalaJS leafletJS

Frank Rojas

I am working with the ScalaJS library https://github.com/fancellu/scalajs-leaflet and I am looking to incorporate some custom javascript from https://jackzoushao.github.io/leaflet-marker-direction The key functionality is the ability to rotate the markers based on the direction of travel. Any tips on how to achieve this will be greatly appreciated.

Dino Fancellu

Look at

https://github.com/fancellu/scalajs-leaflet/blob/master/core/src/main/scala/com/felstar/scalajs/leaflet/Leaflet.scala

Note the Marker, they create an AngleMarker

Try creating appropriae AngleMarker scala code, and pull in the js

Also look at how I pulled in some GeoJSON.js object

https://github.com/fancellu/scalajs-leaflet/commit/1ebbbdc40ef8cdde7aee362864b5f2812d9be5b6

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related