Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>
<div ng-controller="ExampleController">
<input type="search" placeholder="search" ng-model="query">
<ul>
<li ng-repeat="marker in filteredMarkers = (markersProperty | filter:query)" >
<a href="#">{{marker.title}}</a>
</li>
</ul>
<div class="google-map" center="centerProperty" markers="filteredMarkers" fit="true" zoom="12" markers="assets" style="height:300px;width:100%"></div>
</div>
JavaScript
/**!
* The MIT License
*
* Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* angular-google-maps
* https://github.com/nlaplante/angular-google-maps
*
* @author Nicolas Laplante https://plus.google.com/108189012221374960701
*/
(function () {
"use strict";
/*
* Utility functions
*/
/**
* Check if 2 floating point numbers are equal
*
* @see http://stackoverflow.com/a/588014
*/
function floatEqual(f1, f2) {
return (Math.abs(f1 - f2) < 0.000001);
}
/*
* Create the model in a self-contained class where map-specific logic is
* done. This model will be used in the directive.
*/
var MapModel = (function () {
var _defaults = {
zoom: 8,
draggable: false,
container: null
};
/**
*
*/
function PrivateMapModel(opts) {
...