A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pme123/Binding.scala-Google-Maps/commit/115dbff7f149b0eb9f4f262daa5a4ca884901fd6 below:

Merge branch 'add-bindings' · pme123/Binding.scala-Google-Maps@115dbff · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+20

-1

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+20

-1

lines changed Original file line number Diff line number Diff line change

@@ -1,12 +1,21 @@

1 1

package example

2 2 3 +

import com.thoughtworks.binding.{Binding, dom}

3 4

import google.maps.LatLng

5 +

import org.scalajs.dom.raw.HTMLElement

4 6

import org.scalajs.dom.{document, window}

7 + 8 +

import scala.language.implicitConversions

5 9

import scala.scalajs.js

6 10 7 11

object ScalaJSExample extends js.JSApp {

8 12 13 +

implicit def makeIntellijHappy(x: scala.xml.Elem): Binding[HTMLElement] = ???

14 + 9 15

def main(): Unit = {

16 + 17 +

dom.render(document.getElementById("map-control"), render)

18 + 10 19

val initialize = js.Function {

11 20

val opts = google.maps.MapOptions(

12 21

center = new LatLng(51.201203, -1.724370),

@@ -21,4 +30,13 @@ object ScalaJSExample extends js.JSApp {

21 30

google.maps.event.addDomListener(window, "load", initialize)

22 31

}

23 32 33 +

@dom lazy val render: Binding[HTMLElement] = {

34 +

<div>

35 +

<input class="prompt" type="text" placeholder="Address..." />

36 +

<button class="ui primary button">

37 +

Search Address

38 +

</button>

39 +

</div>

40 +

}

41 + 24 42

}

Original file line number Diff line number Diff line change

@@ -1,6 +1,7 @@

1 1

@(message: String)

2 2 3 -

@main("Play with Scala.js") {

3 +

@main("Google maps with Bindings.scala") {

4 +

<div id="map-control"></div>

4 5

<div id="map-canvas"></div>

5 6 6 7

@scalajs.html.scripts("client",

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4