function mockLocationStream(map) {
   var toPosition = function(latLng) {
        return {
            coords: {
                latitude: latLng.lat,
                longitude: latLng.lng
            }
        };
    };
    return {
        watchPosition: function(updateFn) {
            var mapClickStream = new Bacon.Bus();
            map.on('click', mapClickStream.push);
            mapClickStream.map('.latlng')
                .map(toPosition)
                .onValue(updateFn);
        }
    };
}
/* Provides a geolocation-like result that returns location updated based
 * on map taps.  Used for mocking GPS location on the map */
Provides a geolocation-like result that returns location updated based
on map taps.  Used for mocking GPS location on the map
Provides a geolocation - like result that returns location updated based on map taps . Used for mocking GPS location on the map
function mockLocationStream(map) {
   var toPosition = function(latLng) {
        return {
            coords: {
                latitude: latLng.lat,
                longitude: latLng.lng
            }
        };
    };
    return {
        watchPosition: function(updateFn) {
            var mapClickStream = new Bacon.Bus();
            map.on('click', mapClickStream.push);
            mapClickStream.map('.latlng')
                .map(toPosition)
                .onValue(updateFn);
        }
    };
}
function mockLocationStream ( map ) { var toPosition = function ( latLng ) { return { coords : { latitude : latLng . lat , longitude : latLng . lng } } ; } ; return { watchPosition : function ( updateFn ) { var mapClickStream = new Bacon . Bus ( ) ; map . on ( 'click' , mapClickStream . push ) ; mapClickStream . map ( '.latlng' ) . map ( toPosition ) . onValue ( updateFn ) ; } } ; }
Provides a geolocation-like result that returns location updated based
 on map taps.
Provides a geolocation - like result that returns location updated based on map taps .