-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.js
More file actions
42 lines (36 loc) · 1.09 KB
/
Copy pathcore.js
File metadata and controls
42 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ==========================================================================
// Project: MapKit
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals MapKit */
/** @namespace
A Map drawing and interaction framework for google maps
@extends SC.Object
*/
MapKit = SC.Object.create(
/** @scope MapKit.prototype */ {
// ..........................................................
// NS PROPERTIES
//
NAMESPACE: 'MapKit',
VERSION: '0.1.0',
MAPS_NAMESPACE: null,
API_KEY: null,
PINS: null,
store: null,
MAPS: [],
// ..........................................................
// NS FUNCTIONS
//
proxyForMap: function(mapNameOrGUID) {
var proxy, maps = this.get('MAPS');
if (mapNameOrGUID && maps && maps.get('length') > 1) {
var obj = maps.findProperty('key', mapNameOrGUID);
return obj.get('proxy');
} else if (maps.get('length') === 1) {
return maps.getPath('firstObject.proxy');
} else {
SC.Logger.warn("Proxy for %@ could not be found...");
}
}
});