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" ...

Get Programming Reactive Extensions and LINQ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.