Skip to content

Instantly share code, notes, and snippets.

View marlowBlackwood's full-sized avatar

Marlow Nickell marlowBlackwood

View GitHub Profile
@marlowBlackwood
marlowBlackwood / geocoderService.js
Last active June 3, 2016 02:41 — forked from david-meza/geocoderService.js
An AngularJS Service for intelligently geocoding addresses using Google's API. Queries Google's API synchronously to avoid `google.maps.GeocoderStatus.OVER_QUERY_LIMIT`
(function(angular) {
'use strict';
angular.module('geocoder', ['uiGmapgoogle-maps', 'LocalStorageModule']).factory('geocoderService', ['$q', '$timeout', 'uiGmapGoogleMapApi', 'localStorageService',
function ($q, $timeout, mapsApi, localStorage) {
var locations = localStorage.get('locations') ? JSON.parse(localStorage.get('locations')) : {};
var queue = [];