awesome-markers-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/lib/awesome/markers/rails/engine.rb +8 -0
- data/lib/awesome/markers/rails/version.rb +7 -0
- data/lib/awesome-markers-rails.rb +2 -0
- data/vendor/assets/images/markers-matte.png +0 -0
- data/vendor/assets/images/markers-matte@2x.png +0 -0
- data/vendor/assets/images/markers-plain.png +0 -0
- data/vendor/assets/images/markers-shadow.png +0 -0
- data/vendor/assets/images/markers-shadow@2x.png +0 -0
- data/vendor/assets/images/markers-soft.png +0 -0
- data/vendor/assets/images/markers-soft@2x.png +0 -0
- data/vendor/assets/javascripts/leaflet.awesome-markers.js +107 -0
- data/vendor/assets/stylesheets/leaflet.awesome-markers.css +88 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fa18e14da1a83ac162f1e433e1e89a88df490422
|
4
|
+
data.tar.gz: 3c01b8c37d16879777823e3a4618932067633f78
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 005528cca6f0beb07c665376ebcfb5085823c612e7ff9ead333bfbf63f5a2bf514f22614bfc8c61a6d1ccff289452e63a81e0e23f7afc89aa4a215f45cdb573f
|
7
|
+
data.tar.gz: 43f89c1fe4f0d3ef4dd06a1aa4e03592fb5e3063dcbcd88b216eea2106728433e95b636636ca25d5a0193d8d74f98eb4c26a09d9a58745ad0dd0899f263055c3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Alan Meira
|
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,41 @@
|
|
1
|
+
# Awesome::markers::Rails
|
2
|
+
|
3
|
+
Awesome markers for Rails Asset Pipeline
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'awesome-markers-rails'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install awesome-markers-rails
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Add the Javascript to application.js:
|
22
|
+
|
23
|
+
```javascript
|
24
|
+
//=require awesome-markers
|
25
|
+
```
|
26
|
+
|
27
|
+
And then the stylesheet to application.css:
|
28
|
+
|
29
|
+
```css
|
30
|
+
/*
|
31
|
+
*= require awesome-markers
|
32
|
+
*/
|
33
|
+
```
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
1. Fork it
|
38
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
40
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
41
|
+
5. Create new Pull Request
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,107 @@
|
|
1
|
+
/*
|
2
|
+
Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons
|
3
|
+
(c) 2012-2013, Lennard Voogdt
|
4
|
+
|
5
|
+
http://leafletjs.com
|
6
|
+
https://github.com/lvoogdt
|
7
|
+
*/
|
8
|
+
(function (window, document, undefined) {
|
9
|
+
/*
|
10
|
+
* Leaflet.AwesomeMarkers assumes that you have already included the Leaflet library.
|
11
|
+
*/
|
12
|
+
|
13
|
+
L.AwesomeMarkers = {};
|
14
|
+
|
15
|
+
L.AwesomeMarkers.version = '1.0';
|
16
|
+
|
17
|
+
L.AwesomeMarkers.Icon = L.Icon.extend({
|
18
|
+
options: {
|
19
|
+
iconSize: [35, 45],
|
20
|
+
iconAnchor: [17, 42],
|
21
|
+
popupAnchor: [1, -32],
|
22
|
+
shadowAnchor: [10, 12],
|
23
|
+
shadowSize: [36, 16],
|
24
|
+
className: 'awesome-marker',
|
25
|
+
icon: 'home',
|
26
|
+
color: 'blue',
|
27
|
+
iconColor: 'white'
|
28
|
+
},
|
29
|
+
|
30
|
+
initialize: function (options) {
|
31
|
+
options = L.setOptions(this, options);
|
32
|
+
},
|
33
|
+
|
34
|
+
createIcon: function () {
|
35
|
+
var div = document.createElement('div'),
|
36
|
+
options = this.options;
|
37
|
+
|
38
|
+
if (options.icon) {
|
39
|
+
div.innerHTML = this._createInner();
|
40
|
+
}
|
41
|
+
|
42
|
+
if (options.bgPos) {
|
43
|
+
div.style.backgroundPosition =
|
44
|
+
(-options.bgPos.x) + 'px ' + (-options.bgPos.y) + 'px';
|
45
|
+
}
|
46
|
+
|
47
|
+
this._setIconStyles(div, 'icon-' + options.color);
|
48
|
+
return div;
|
49
|
+
},
|
50
|
+
|
51
|
+
_createInner: function() {
|
52
|
+
var iconClass;
|
53
|
+
if(this.options.icon.slice(0,5)==="icon-"){
|
54
|
+
iconClass=this.options.icon;
|
55
|
+
}else{
|
56
|
+
iconClass="icon-"+this.options.icon;
|
57
|
+
}
|
58
|
+
return "<i class='" + iconClass
|
59
|
+
+ (this.options.spin ? " icon-spin" :"")
|
60
|
+
+ (this.options.iconColor ? " icon-" + this.options.iconColor :"") + "'></i>";
|
61
|
+
},
|
62
|
+
|
63
|
+
_setIconStyles: function (img, name) {
|
64
|
+
var options = this.options,
|
65
|
+
size = L.point(options[name == 'shadow' ? 'shadowSize' : 'iconSize']),
|
66
|
+
anchor;
|
67
|
+
|
68
|
+
if (name === 'shadow') {
|
69
|
+
anchor = L.point(options.shadowAnchor || options.iconAnchor);
|
70
|
+
} else {
|
71
|
+
anchor = L.point(options.iconAnchor);
|
72
|
+
}
|
73
|
+
|
74
|
+
if (!anchor && size) {
|
75
|
+
anchor = size.divideBy(2, true);
|
76
|
+
}
|
77
|
+
|
78
|
+
img.className = 'awesome-marker-' + name + ' ' + options.className;
|
79
|
+
|
80
|
+
if (anchor) {
|
81
|
+
img.style.marginLeft = (-anchor.x) + 'px';
|
82
|
+
img.style.marginTop = (-anchor.y) + 'px';
|
83
|
+
}
|
84
|
+
|
85
|
+
if (size) {
|
86
|
+
img.style.width = size.x + 'px';
|
87
|
+
img.style.height = size.y + 'px';
|
88
|
+
}
|
89
|
+
},
|
90
|
+
|
91
|
+
createShadow: function () {
|
92
|
+
var div = document.createElement('div'),
|
93
|
+
options = this.options;
|
94
|
+
|
95
|
+
this._setIconStyles(div, 'shadow');
|
96
|
+
return div;
|
97
|
+
}
|
98
|
+
});
|
99
|
+
|
100
|
+
L.AwesomeMarkers.icon = function (options) {
|
101
|
+
return new L.AwesomeMarkers.Icon(options);
|
102
|
+
};
|
103
|
+
|
104
|
+
}(this, document));
|
105
|
+
|
106
|
+
|
107
|
+
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/*
|
2
|
+
Author: L. Voogdt
|
3
|
+
License: MIT
|
4
|
+
Version: 1.0
|
5
|
+
*/
|
6
|
+
|
7
|
+
/* Marker setup */
|
8
|
+
.awesome-marker {
|
9
|
+
background: url('images/markers-soft.png') no-repeat 0 0;
|
10
|
+
width: 35px;
|
11
|
+
height: 46px;
|
12
|
+
position:absolute;
|
13
|
+
left:0;
|
14
|
+
top:0;
|
15
|
+
display: block;
|
16
|
+
text-align: center;
|
17
|
+
}
|
18
|
+
|
19
|
+
.awesome-marker-shadow {
|
20
|
+
background: url('images/markers-shadow.png') no-repeat 0 0;
|
21
|
+
width: 36px;
|
22
|
+
height: 16px;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* Retina displays */
|
26
|
+
@media (min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),
|
27
|
+
(-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5),(min-resolution: 1.5dppx) {
|
28
|
+
.awesome-marker {
|
29
|
+
background-image: url('images/markers-soft@2x.png');
|
30
|
+
background-size: 360px 46px;
|
31
|
+
}
|
32
|
+
.awesome-marker-shadow {
|
33
|
+
background-image: url('images/markers-shadow@2x.png');
|
34
|
+
background-size: 35px 16px;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.awesome-marker i {
|
39
|
+
color: #333;
|
40
|
+
margin-top: 10px;
|
41
|
+
display: inline-block;
|
42
|
+
font-size: 14px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.awesome-marker .icon-white {
|
46
|
+
color: #fff;
|
47
|
+
}
|
48
|
+
|
49
|
+
/* Colors */
|
50
|
+
.awesome-marker-icon-red {
|
51
|
+
background-position: 0 0;
|
52
|
+
}
|
53
|
+
|
54
|
+
.awesome-marker-icon-darkred {
|
55
|
+
background-position: -180px 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
.awesome-marker-icon-orange {
|
59
|
+
background-position: -36px 0;
|
60
|
+
}
|
61
|
+
|
62
|
+
.awesome-marker-icon-green {
|
63
|
+
background-position: -72px 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
.awesome-marker-icon-darkgreen {
|
67
|
+
background-position: -252px 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.awesome-marker-icon-blue {
|
71
|
+
background-position: -108px 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
.awesome-marker-icon-darkblue {
|
75
|
+
background-position: -216px 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
.awesome-marker-icon-purple {
|
79
|
+
background-position: -144px 0;
|
80
|
+
}
|
81
|
+
|
82
|
+
.awesome-marker-icon-darkpurple {
|
83
|
+
background-position: -288px 0;
|
84
|
+
}
|
85
|
+
|
86
|
+
.awesome-marker-icon-cadetblue {
|
87
|
+
background-position: -324px 0;
|
88
|
+
}
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: awesome-markers-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alan Meira
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: railties
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Awesome Markers for Rails Asset Pipeline
|
56
|
+
email:
|
57
|
+
- alanmeira@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- lib/awesome/markers/rails/engine.rb
|
63
|
+
- lib/awesome/markers/rails/version.rb
|
64
|
+
- lib/awesome-markers-rails.rb
|
65
|
+
- vendor/assets/images/markers-matte.png
|
66
|
+
- vendor/assets/images/markers-matte@2x.png
|
67
|
+
- vendor/assets/images/markers-plain.png
|
68
|
+
- vendor/assets/images/markers-shadow.png
|
69
|
+
- vendor/assets/images/markers-shadow@2x.png
|
70
|
+
- vendor/assets/images/markers-soft.png
|
71
|
+
- vendor/assets/images/markers-soft@2x.png
|
72
|
+
- vendor/assets/javascripts/leaflet.awesome-markers.js
|
73
|
+
- vendor/assets/stylesheets/leaflet.awesome-markers.css
|
74
|
+
- LICENSE.txt
|
75
|
+
- README.md
|
76
|
+
homepage: https://github.com/alanmeira/awesome-markers-rails
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.1.9
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: Awesome Markers for Rails Asset Pipeline
|
100
|
+
test_files: []
|