O'Reilly logo

Programming Reactive Extensions and LINQ by Paul Betts, Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example: Using RxJS with HTML 5 Geolocation and DOM Events

Let's take a look at a larger sample of how we can use our RxJS-enabled Geolocation function in any web page. First, let's create some HTML, as follows:

<html>   <head>     <script type="text/javascript" src="lib/jquery-1.6.2.js"></script>     <script type="text/javascript" src="lib/rx.js"></script>     <script type="text/javascript" src="lib/rx.jQuery.js"></script>   </head>   <body>     <h2>Geolocation + RxJS sample</h2>     <form>       <select id="mapOpts">         <option class="typeopt" value="roadmap">Road Map</option>         <option class="typeopt" value="satellite">Satellite</option>         <option class="typeopt" value="terrain">Terrain</option>         <option class="typeopt" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required