sudo-gmapsmarker-rails 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/lib/sudo-gmapsmarker-rails/version.rb +3 -0
- data/lib/sudo-gmapsmarker-rails.rb +8 -0
- data/sudo-gmapsmarker-rails.gemspec +18 -0
- data/vendor/assets/images/markers/circle-green-0.png +0 -0
- data/vendor/assets/images/markers/circle-green-1.png +0 -0
- data/vendor/assets/images/markers/circle-green-2.png +0 -0
- data/vendor/assets/images/markers/circle-green-3.png +0 -0
- data/vendor/assets/images/markers/circle-green-4.png +0 -0
- data/vendor/assets/images/markers/circle-green-5.png +0 -0
- data/vendor/assets/images/markers/circle-green-6.png +0 -0
- data/vendor/assets/images/markers/circle-green-7.png +0 -0
- data/vendor/assets/images/markers/circle-green-8.png +0 -0
- data/vendor/assets/images/markers/circle-green-9.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-0.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-1.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-2.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-3.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-4.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-5.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-6.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-7.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-8.png +0 -0
- data/vendor/assets/images/markers/circle-green-transparent-9.png +0 -0
- data/vendor/assets/images/markers/circle-red-0.png +0 -0
- data/vendor/assets/images/markers/circle-red-1.png +0 -0
- data/vendor/assets/images/markers/circle-red-2.png +0 -0
- data/vendor/assets/images/markers/circle-red-3.png +0 -0
- data/vendor/assets/images/markers/circle-red-4.png +0 -0
- data/vendor/assets/images/markers/circle-red-5.png +0 -0
- data/vendor/assets/images/markers/circle-red-6.png +0 -0
- data/vendor/assets/images/markers/circle-red-7.png +0 -0
- data/vendor/assets/images/markers/circle-red-8.png +0 -0
- data/vendor/assets/images/markers/circle-red-9.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-0.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-1.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-2.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-3.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-4.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-5.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-6.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-7.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-8.png +0 -0
- data/vendor/assets/images/markers/circle-red-transparent-9.png +0 -0
- data/vendor/assets/images/markers/pin-blue-1.png +0 -0
- data/vendor/assets/images/markers/pin-blue-2.png +0 -0
- data/vendor/assets/images/markers/pin-blue-3.png +0 -0
- data/vendor/assets/images/markers/pin-blue-4.png +0 -0
- data/vendor/assets/images/markers/pin-blue-5.png +0 -0
- data/vendor/assets/images/markers/pin-blue-6.png +0 -0
- data/vendor/assets/images/markers/pin-blue-7.png +0 -0
- data/vendor/assets/images/markers/pin-blue-8.png +0 -0
- data/vendor/assets/images/markers/pin-blue-9.png +0 -0
- data/vendor/assets/images/markers/pin-green-0.png +0 -0
- data/vendor/assets/images/markers/pin-green-1.png +0 -0
- data/vendor/assets/images/markers/pin-green-2.png +0 -0
- data/vendor/assets/images/markers/pin-green-3.png +0 -0
- data/vendor/assets/images/markers/pin-green-4.png +0 -0
- data/vendor/assets/images/markers/pin-green-5.png +0 -0
- data/vendor/assets/images/markers/pin-green-6.png +0 -0
- data/vendor/assets/images/markers/pin-green-7.png +0 -0
- data/vendor/assets/images/markers/pin-green-8.png +0 -0
- data/vendor/assets/images/markers/pin-green-9.png +0 -0
- data/vendor/assets/images/markers/pin-red-0.png +0 -0
- data/vendor/assets/images/markers/pin-red-1.png +0 -0
- data/vendor/assets/images/markers/pin-red-2.png +0 -0
- data/vendor/assets/images/markers/pin-red-3.png +0 -0
- data/vendor/assets/images/markers/pin-red-4.png +0 -0
- data/vendor/assets/images/markers/pin-red-5.png +0 -0
- data/vendor/assets/images/markers/pin-red-6.png +0 -0
- data/vendor/assets/images/markers/pin-red-7.png +0 -0
- data/vendor/assets/images/markers/pin-red-8.png +0 -0
- data/vendor/assets/images/markers/pin-red-9.png +0 -0
- data/vendor/assets/images/markers/pin-shadow.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-10.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-100.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-20.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-30.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-40.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-50.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-60.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-70.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-80.png +0 -0
- data/vendor/assets/images/markers/rabbit-orange-0-90.png +0 -0
- data/vendor/assets/javascripts/sudo.gmapsmarker.js +188 -0
- metadata +135 -0
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2012 Todd Eichel
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
sudo-gmapsmarker-rails
|
|
2
|
+
======================
|
|
3
|
+
|
|
4
|
+
Wrapper for Google Maps Markers (google.maps.Marker) in sudo-js. Taken from Todd E's "backbone-gmapsmarker-rails"
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Add this line to your application's Gemfile:
|
|
9
|
+
|
|
10
|
+
gem 'sudo-gmapsmarker-rails'
|
|
11
|
+
|
|
12
|
+
Then require it from a manifest file:
|
|
13
|
+
|
|
14
|
+
//= require sudo-gmapsmarker-rails
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
There are two views available: a basic one meant to be extended (`Backbone.GMapsMarker.MarkerView`),
|
|
20
|
+
and a more featureful one that extends the basic view (`Backbone.GMapsMarker.PrettyMarkerView`).
|
|
21
|
+
Feel free to extend either one of these to add your own features, or just use them directly like so:
|
|
22
|
+
|
|
23
|
+
var myView = new _.GMapsMarker.PrettyMarkerView({
|
|
24
|
+
model: myLocation,
|
|
25
|
+
mapView: myMapView,
|
|
26
|
+
color: 'blue'
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
Check out the inline comments in the `.js` file for additional options.
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'sudo-gmapsmarker-rails/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |gem|
|
|
7
|
+
gem.name = "sudo-gmapsmarker-rails"
|
|
8
|
+
gem.version = SudoGmapsmarker::VERSION
|
|
9
|
+
gem.authors = ["Todd Eichel", "Rob Robbins"]
|
|
10
|
+
gem.email = ["rob@taskrabbit.com"]
|
|
11
|
+
gem.summary = %q{Bundles sudo.gmapsmarker and some TaskRabbit-style marker icons for use with the Rails asset pipeline.}
|
|
12
|
+
gem.homepage = "https://github.com/robrobbins/sudo-gmapsmarker-rails"
|
|
13
|
+
|
|
14
|
+
gem.files = `git ls-files`.split($/)
|
|
15
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
16
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
17
|
+
gem.require_paths = ["lib"]
|
|
18
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Sudojs Google Maps Marker View
|
|
3
|
+
*
|
|
4
|
+
* Wrapper for Google Maps Markers (google.maps.Marker). See inline comments
|
|
5
|
+
* for usage notes.
|
|
6
|
+
*
|
|
7
|
+
* Author: Todd Eichel, Rob Robbins
|
|
8
|
+
* Date: Nov 30, 2012 - The End
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
|
11
|
+
* Copyright (c) 2013 Todd Eichel, Rob Robbins
|
|
12
|
+
*******************************************************************************
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
(function (_) {
|
|
16
|
+
|
|
17
|
+
// create namespace
|
|
18
|
+
_.namespace('sudo.GMapsMarker');
|
|
19
|
+
|
|
20
|
+
// Wrapper for Google Maps Markers (google.maps.Marker)
|
|
21
|
+
//
|
|
22
|
+
// Options to be passed as the data arg, or in a passed model reference:
|
|
23
|
+
// - mapView (required): should have a "gmap" property with the map to attach to
|
|
24
|
+
// - model (optional): if a sudo Model with lat/lng attributes is supplied, marker will update its position when it changes
|
|
25
|
+
// - zIndex (optional): if provided, sets the zIndex for the marker on render; see google maps docs for more info
|
|
26
|
+
_.GMapsMarker.MarkerView = function(el, data) {
|
|
27
|
+
// as this class uses `inherit()` it's base constructor must be called formally
|
|
28
|
+
_.View.call(this, el, data);
|
|
29
|
+
|
|
30
|
+
this.gmarker = new google.maps.Marker();
|
|
31
|
+
this.observer = this.model.observe(this.handleChange.bind(this));
|
|
32
|
+
};
|
|
33
|
+
// Inherits from, and extends _.View
|
|
34
|
+
_.inherit(_.View, _.GMapsMarker.MarkerView);
|
|
35
|
+
|
|
36
|
+
_.GMapsMarker.MarkerView.prototype.handleChange = function handleChange(change) {
|
|
37
|
+
if(change && change.name === 'lng') {
|
|
38
|
+
var modelLatLng = new google.maps.LatLng(change.object.lat, change.object.lng);
|
|
39
|
+
this.gmarker.setPosition(modelLatLng);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
_.GMapsMarker.MarkerView.prototype.render = function render() {
|
|
44
|
+
this.setPosition();
|
|
45
|
+
this.gmarker.setZIndex(this.model.get('zIndex'));
|
|
46
|
+
this.gmarker.setMap(this.model.get('mapView')).gmap;
|
|
47
|
+
return this;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
_.GMapsMarker.MarkerView.prototype.remove = function remove() {
|
|
51
|
+
this.model.unobserve(this.observer);
|
|
52
|
+
this.gmarker.setMap(null);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
_.GMapsMarker.MarkerView.prototype.setPosition = function setPosition() {
|
|
56
|
+
var modelLatLng = new google.maps.LatLng(this.model.get('lat'), this.model.get('lng'));
|
|
57
|
+
this.gmarker.setPosition(modelLatLng);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Wrapper for making pretty TR-style markers (google.maps.Marker) based on icons in `/assets/markers`.
|
|
61
|
+
// Marker images should be provided in the following format (opacity is optional): shape-color-number[-opacity].png,
|
|
62
|
+
// e.g. pin-green-1.png or rabbit-orange-0-50.png
|
|
63
|
+
//
|
|
64
|
+
// Options in this classes model or passed in the `data` arg:
|
|
65
|
+
// - mapView (required): should have a "gmap" property with the map to attach to
|
|
66
|
+
// The following options are all optional (default in parens). Note that we don't have image assets
|
|
67
|
+
// for all possible permutations. See notes below or /assets/markers for what's available.
|
|
68
|
+
// - shape (pin): marker shape, generally pin or circle
|
|
69
|
+
// - color (red): marker color, generally red/green/blue (green-transparent is available for circles)
|
|
70
|
+
// - number (none): use a numbered marker image from 1 to 9; exceptions: no non-number marker for rough icons or blue
|
|
71
|
+
// - opacity (none): use a different opacity marker image icon; opacity represented as a percentage: 0-100
|
|
72
|
+
// - rough (false): forces use of a less specific icon (circle instead of pin), exception: we don't have rough icons for blue
|
|
73
|
+
// - stalenessIndicatorTime (none): lowers the marker opacity by 10% every _t_ milliseconds if a location update has not been received; 0 disables
|
|
74
|
+
// - stalenessIndicatorMinOpacity (10): sets a floor after which the staleness indicator fading will have no effect
|
|
75
|
+
_.GMapsMarker.PrettyMarkerView = function(el, data) {
|
|
76
|
+
// call MarkerView's constructor
|
|
77
|
+
this.construct(el, data);
|
|
78
|
+
var options = this.model.data;
|
|
79
|
+
|
|
80
|
+
this.iconBasePath = options.iconBasePath || '/assets/markers/';
|
|
81
|
+
|
|
82
|
+
this.shape = options.shape || 'pin';
|
|
83
|
+
this.color = options.color || 'red';
|
|
84
|
+
this.number = options.number || 0;
|
|
85
|
+
this.rough = options.rough || false;
|
|
86
|
+
|
|
87
|
+
this.opacity = options.opacity;
|
|
88
|
+
this.stalenessIndicatorMinOpacity = options.stalenessIndicatorMinOpacity || 10;
|
|
89
|
+
this.stalenessIndicatorTime = options.stalenessIndicatorTime;
|
|
90
|
+
|
|
91
|
+
// override marker shape for rough markers
|
|
92
|
+
if (this.rough) {
|
|
93
|
+
this.shape = 'circle';
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
_.GMapsMarker.PrettyMarkerView.prototype = Object.create(_.GMapsMarker.MarkerView.prototype);
|
|
98
|
+
|
|
99
|
+
_.GMapsMarker.PrettyMarkerView.prototype.setPosition = function setPosition() {
|
|
100
|
+
// do the normal position setting and return if no staleness indicator
|
|
101
|
+
this.base('setPosition');
|
|
102
|
+
if (!this.model.get('stalenessIndicatorTime')) return;
|
|
103
|
+
|
|
104
|
+
this.setOpacity(100);
|
|
105
|
+
this.gmarker.setIcon(this.getGMarkerIcon());
|
|
106
|
+
if(this.stalenessIndicator) clearTimeout(this.stalenessIndicator);
|
|
107
|
+
this.stalenessIndicator = setTimeout(this.fade.bind(this), this.stalenessIndicatorTime);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
_.GMapsMarker.PrettyMarkerView.prototype.setOpacity = function setOpacity(opacity) {
|
|
111
|
+
var min = this.stalenessIndicatorMinOpacity || 0,
|
|
112
|
+
max = 100;
|
|
113
|
+
|
|
114
|
+
this.opacity = Math.max(Math.min(opacity, max), min);
|
|
115
|
+
return this.opacity;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
_.GMapsMarker.PrettyMarkerView.prototype.fade = function fade() {
|
|
119
|
+
var minOpacity = this.stalenessIndicatorMinOpacity,
|
|
120
|
+
timeout = this.stalenessIndicatorTime;
|
|
121
|
+
|
|
122
|
+
if (this.opacity === minOpacity) { return; }
|
|
123
|
+
|
|
124
|
+
this.setOpacity(this.opacity - 10); // decrement opacity
|
|
125
|
+
this.gmarker.setIcon(this.getGMarkerIcon()); // reset icon in light of new opacity
|
|
126
|
+
this.stalenessIndicator = _.delay(this.fade, timeout); // schedule the next fade
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
_.GMapsMarker.PrettyMarkerView.prototype.getGMarkerIcon = function getGMarkerIcon() {
|
|
130
|
+
var anchor = ((this.shape === 'circle' || this.shape === 'rabbit') ? [22.5, 22.5] : null),
|
|
131
|
+
url = this.generateIconUrl();
|
|
132
|
+
|
|
133
|
+
this.gMarkerIcon = this.generateGMarkerImage(url, null, null, anchor);
|
|
134
|
+
return this.gMarkerIcon;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
_.GMapsMarker.PrettyMarkerView.prototype.getGMarkerShadow = function getGMarkerShadow() {
|
|
138
|
+
if (this.shape !== 'pin') return; // we only have a shadow image for pins
|
|
139
|
+
|
|
140
|
+
var anchor = [9, 31],
|
|
141
|
+
url = this.iconBasePath + this.shape + "-shadow.png";
|
|
142
|
+
|
|
143
|
+
this.gMarkerShadow = this.generateGMarkerImage(url, null, null, anchor);
|
|
144
|
+
return this.gMarkerShadow;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
_.GMapsMarker.PrettyMarkerView.prototype.render = function render() {
|
|
148
|
+
this.gmarker.setIcon(this.getGMarkerIcon());
|
|
149
|
+
this.gmarker.setShadow(this.getGMarkerShadow());
|
|
150
|
+
|
|
151
|
+
return this.constructor.__super__.render.apply(this);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// helper methods
|
|
155
|
+
/////////////////////////////////////////////////////////////////////////////
|
|
156
|
+
_.GMapsMarker.PrettyMarkerView.prototype.generateGMarkerImage = function generateGMarkerImage(url, size, origin, anchor) {
|
|
157
|
+
// this weirdness necessary because we have to pass null to the google constructor if these options aren't present
|
|
158
|
+
|
|
159
|
+
size = size || null;
|
|
160
|
+
origin = origin || null;
|
|
161
|
+
anchor = anchor || null;
|
|
162
|
+
|
|
163
|
+
if (size) { size = new google.maps.Size(size[0], size[1]); }
|
|
164
|
+
if (origin) { origin = new google.maps.Point(origin[0], origin[1]); }
|
|
165
|
+
if (anchor) { anchor = new google.maps.Point(anchor[0], anchor[1]); }
|
|
166
|
+
|
|
167
|
+
return new google.maps.MarkerImage(url, size, origin, anchor);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
_.GMapsMarker.PrettyMarkerView.prototype.generateIconUrl = function generateIconUrl() {
|
|
171
|
+
var url = this.iconBasePath,
|
|
172
|
+
nameParts = [];
|
|
173
|
+
|
|
174
|
+
nameParts.push(this.shape);
|
|
175
|
+
nameParts.push(this.color);
|
|
176
|
+
nameParts.push(this.number.toString());
|
|
177
|
+
|
|
178
|
+
if (this.opacity) {
|
|
179
|
+
nameParts.push(this.opacity.toString());
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
url += nameParts.join('-');
|
|
183
|
+
url += '.png';
|
|
184
|
+
|
|
185
|
+
return url;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
}(sudo));
|
metadata
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: sudo-gmapsmarker-rails
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Todd Eichel
|
|
9
|
+
- Rob Robbins
|
|
10
|
+
autorequire:
|
|
11
|
+
bindir: bin
|
|
12
|
+
cert_chain: []
|
|
13
|
+
date: 2013-02-02 00:00:00.000000000 Z
|
|
14
|
+
dependencies: []
|
|
15
|
+
description:
|
|
16
|
+
email:
|
|
17
|
+
- rob@taskrabbit.com
|
|
18
|
+
executables: []
|
|
19
|
+
extensions: []
|
|
20
|
+
extra_rdoc_files: []
|
|
21
|
+
files:
|
|
22
|
+
- Gemfile
|
|
23
|
+
- LICENSE.txt
|
|
24
|
+
- README.md
|
|
25
|
+
- Rakefile
|
|
26
|
+
- lib/sudo-gmapsmarker-rails.rb
|
|
27
|
+
- lib/sudo-gmapsmarker-rails/version.rb
|
|
28
|
+
- sudo-gmapsmarker-rails.gemspec
|
|
29
|
+
- vendor/assets/images/markers/circle-green-0.png
|
|
30
|
+
- vendor/assets/images/markers/circle-green-1.png
|
|
31
|
+
- vendor/assets/images/markers/circle-green-2.png
|
|
32
|
+
- vendor/assets/images/markers/circle-green-3.png
|
|
33
|
+
- vendor/assets/images/markers/circle-green-4.png
|
|
34
|
+
- vendor/assets/images/markers/circle-green-5.png
|
|
35
|
+
- vendor/assets/images/markers/circle-green-6.png
|
|
36
|
+
- vendor/assets/images/markers/circle-green-7.png
|
|
37
|
+
- vendor/assets/images/markers/circle-green-8.png
|
|
38
|
+
- vendor/assets/images/markers/circle-green-9.png
|
|
39
|
+
- vendor/assets/images/markers/circle-green-transparent-0.png
|
|
40
|
+
- vendor/assets/images/markers/circle-green-transparent-1.png
|
|
41
|
+
- vendor/assets/images/markers/circle-green-transparent-2.png
|
|
42
|
+
- vendor/assets/images/markers/circle-green-transparent-3.png
|
|
43
|
+
- vendor/assets/images/markers/circle-green-transparent-4.png
|
|
44
|
+
- vendor/assets/images/markers/circle-green-transparent-5.png
|
|
45
|
+
- vendor/assets/images/markers/circle-green-transparent-6.png
|
|
46
|
+
- vendor/assets/images/markers/circle-green-transparent-7.png
|
|
47
|
+
- vendor/assets/images/markers/circle-green-transparent-8.png
|
|
48
|
+
- vendor/assets/images/markers/circle-green-transparent-9.png
|
|
49
|
+
- vendor/assets/images/markers/circle-red-0.png
|
|
50
|
+
- vendor/assets/images/markers/circle-red-1.png
|
|
51
|
+
- vendor/assets/images/markers/circle-red-2.png
|
|
52
|
+
- vendor/assets/images/markers/circle-red-3.png
|
|
53
|
+
- vendor/assets/images/markers/circle-red-4.png
|
|
54
|
+
- vendor/assets/images/markers/circle-red-5.png
|
|
55
|
+
- vendor/assets/images/markers/circle-red-6.png
|
|
56
|
+
- vendor/assets/images/markers/circle-red-7.png
|
|
57
|
+
- vendor/assets/images/markers/circle-red-8.png
|
|
58
|
+
- vendor/assets/images/markers/circle-red-9.png
|
|
59
|
+
- vendor/assets/images/markers/circle-red-transparent-0.png
|
|
60
|
+
- vendor/assets/images/markers/circle-red-transparent-1.png
|
|
61
|
+
- vendor/assets/images/markers/circle-red-transparent-2.png
|
|
62
|
+
- vendor/assets/images/markers/circle-red-transparent-3.png
|
|
63
|
+
- vendor/assets/images/markers/circle-red-transparent-4.png
|
|
64
|
+
- vendor/assets/images/markers/circle-red-transparent-5.png
|
|
65
|
+
- vendor/assets/images/markers/circle-red-transparent-6.png
|
|
66
|
+
- vendor/assets/images/markers/circle-red-transparent-7.png
|
|
67
|
+
- vendor/assets/images/markers/circle-red-transparent-8.png
|
|
68
|
+
- vendor/assets/images/markers/circle-red-transparent-9.png
|
|
69
|
+
- vendor/assets/images/markers/pin-blue-1.png
|
|
70
|
+
- vendor/assets/images/markers/pin-blue-2.png
|
|
71
|
+
- vendor/assets/images/markers/pin-blue-3.png
|
|
72
|
+
- vendor/assets/images/markers/pin-blue-4.png
|
|
73
|
+
- vendor/assets/images/markers/pin-blue-5.png
|
|
74
|
+
- vendor/assets/images/markers/pin-blue-6.png
|
|
75
|
+
- vendor/assets/images/markers/pin-blue-7.png
|
|
76
|
+
- vendor/assets/images/markers/pin-blue-8.png
|
|
77
|
+
- vendor/assets/images/markers/pin-blue-9.png
|
|
78
|
+
- vendor/assets/images/markers/pin-green-0.png
|
|
79
|
+
- vendor/assets/images/markers/pin-green-1.png
|
|
80
|
+
- vendor/assets/images/markers/pin-green-2.png
|
|
81
|
+
- vendor/assets/images/markers/pin-green-3.png
|
|
82
|
+
- vendor/assets/images/markers/pin-green-4.png
|
|
83
|
+
- vendor/assets/images/markers/pin-green-5.png
|
|
84
|
+
- vendor/assets/images/markers/pin-green-6.png
|
|
85
|
+
- vendor/assets/images/markers/pin-green-7.png
|
|
86
|
+
- vendor/assets/images/markers/pin-green-8.png
|
|
87
|
+
- vendor/assets/images/markers/pin-green-9.png
|
|
88
|
+
- vendor/assets/images/markers/pin-red-0.png
|
|
89
|
+
- vendor/assets/images/markers/pin-red-1.png
|
|
90
|
+
- vendor/assets/images/markers/pin-red-2.png
|
|
91
|
+
- vendor/assets/images/markers/pin-red-3.png
|
|
92
|
+
- vendor/assets/images/markers/pin-red-4.png
|
|
93
|
+
- vendor/assets/images/markers/pin-red-5.png
|
|
94
|
+
- vendor/assets/images/markers/pin-red-6.png
|
|
95
|
+
- vendor/assets/images/markers/pin-red-7.png
|
|
96
|
+
- vendor/assets/images/markers/pin-red-8.png
|
|
97
|
+
- vendor/assets/images/markers/pin-red-9.png
|
|
98
|
+
- vendor/assets/images/markers/pin-shadow.png
|
|
99
|
+
- vendor/assets/images/markers/rabbit-orange-0-10.png
|
|
100
|
+
- vendor/assets/images/markers/rabbit-orange-0-100.png
|
|
101
|
+
- vendor/assets/images/markers/rabbit-orange-0-20.png
|
|
102
|
+
- vendor/assets/images/markers/rabbit-orange-0-30.png
|
|
103
|
+
- vendor/assets/images/markers/rabbit-orange-0-40.png
|
|
104
|
+
- vendor/assets/images/markers/rabbit-orange-0-50.png
|
|
105
|
+
- vendor/assets/images/markers/rabbit-orange-0-60.png
|
|
106
|
+
- vendor/assets/images/markers/rabbit-orange-0-70.png
|
|
107
|
+
- vendor/assets/images/markers/rabbit-orange-0-80.png
|
|
108
|
+
- vendor/assets/images/markers/rabbit-orange-0-90.png
|
|
109
|
+
- vendor/assets/javascripts/sudo.gmapsmarker.js
|
|
110
|
+
homepage: https://github.com/robrobbins/sudo-gmapsmarker-rails
|
|
111
|
+
licenses: []
|
|
112
|
+
post_install_message:
|
|
113
|
+
rdoc_options: []
|
|
114
|
+
require_paths:
|
|
115
|
+
- lib
|
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
|
+
none: false
|
|
118
|
+
requirements:
|
|
119
|
+
- - ! '>='
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '0'
|
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
|
+
none: false
|
|
124
|
+
requirements:
|
|
125
|
+
- - ! '>='
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: '0'
|
|
128
|
+
requirements: []
|
|
129
|
+
rubyforge_project:
|
|
130
|
+
rubygems_version: 1.8.24
|
|
131
|
+
signing_key:
|
|
132
|
+
specification_version: 3
|
|
133
|
+
summary: Bundles sudo.gmapsmarker and some TaskRabbit-style marker icons for use with
|
|
134
|
+
the Rails asset pipeline.
|
|
135
|
+
test_files: []
|