leaflet_numbered_markers-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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c2e666d448ac9d3d68a5f5feae74fb4a6c3bdd36
4
+ data.tar.gz: a06ee3f4c73c4c40bbf8a23ec0dd744eb332d957
5
+ SHA512:
6
+ metadata.gz: 70dea1397d5ead0acbdc6c3166488d219f3c7eb9075cd831722fc3f9f2fedb796904602ed1bd0c0f3097d7b5ed0119a5b91ddfb061a1a03e5ebce2f56040520d
7
+ data.tar.gz: f48822ae09bf95eecd277527ff15c25b664bd4a6976459484d19fda92c3509a74b839a97a87199ea765cf7b5365577beeb405f14b0bf16e1c72e14a079248804
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in leaflet_numbered_markers-rails.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 frodrigo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # LeafletNumberedMarkers::Rails
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'leaflet_numbered_markers-rails'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install leaflet_numbered_markers-rails
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'leaflet_numbered_markers/rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "leaflet_numbered_markers-rails"
8
+ spec.version = LeafletNumberedMarkers::Rails::VERSION
9
+ spec.authors = ["Frédéric Rodrigo"]
10
+ spec.email = ["fred.rodrigo@gmail.com"]
11
+ spec.description = %q{Add a number aside Leaflet marker based on https://gist.github.com/comp615/2288108}
12
+ spec.summary = %q{Add a number aside Leaflet marker}
13
+ spec.homepage = "https://gist.github.com/comp615/2288108"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ end
@@ -0,0 +1,12 @@
1
+ require "leaflet_numbered_markers/rails/version"
2
+
3
+ module LeafletNumberedMarkers
4
+ module Rails
5
+ # make me a rails engine
6
+ class Engine < ::Rails::Engine
7
+ initializer 'leaflet-rails.precompile' do |app|
8
+ app.config.assets.precompile += %w(marker-icon.png)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module LeafletNumberedMarkers
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ L.NumberedDivIcon = L.Icon.extend({
2
+ options: {
3
+ iconUrl: '<%= asset_path('marker-icon.png') %>',
4
+ number: '',
5
+ shadowUrl: null,
6
+ iconSize: new L.Point(25, 41),
7
+ iconAnchor: new L.Point(13, 41),
8
+ popupAnchor: new L.Point(0, -33),
9
+ /*
10
+ iconAnchor: (Point)
11
+ popupAnchor: (Point)
12
+ */
13
+ className: 'leaflet-numbered-markers-div-icon'
14
+ },
15
+
16
+ createIcon: function () {
17
+ var div = document.createElement('div');
18
+ var img = this._createImg(this.options['iconUrl']);
19
+ var numdiv = document.createElement('div');
20
+ numdiv.setAttribute ( "class", "number" );
21
+ numdiv.innerHTML = this.options['number'] || '';
22
+ div.appendChild ( img );
23
+ div.appendChild ( numdiv );
24
+ this._setIconStyles(div, 'icon');
25
+ return div;
26
+ },
27
+
28
+ //you could change this to add a shadow like in the normal marker if you really wanted
29
+ createShadow: function () {
30
+ return null;
31
+ }
32
+ });
@@ -0,0 +1,16 @@
1
+ .leaflet-numbered-markers-div-icon {
2
+ background: transparent;
3
+ border: none;
4
+ }
5
+
6
+ .leaflet-marker-icon .number{
7
+ background-color: #FFFFFF;
8
+ border-radius: 5px 5px 5px 5px;
9
+ font-size: 9px;
10
+ position: absolute;
11
+ right: -6px;
12
+ text-align: center;
13
+ top: -3px;
14
+ vertical-align: middle;
15
+ width: 16px;
16
+ }
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: leaflet_numbered_markers-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Frédéric Rodrigo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-16 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
+ description: Add a number aside Leaflet marker based on https://gist.github.com/comp615/2288108
42
+ email:
43
+ - fred.rodrigo@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE
51
+ - README.md
52
+ - Rakefile
53
+ - leaflet_numbered_markers-rails.gemspec
54
+ - lib/leaflet_numbered_markers/rails.rb
55
+ - lib/leaflet_numbered_markers/rails/version.rb
56
+ - vendor/assets/images/marker-icon.png
57
+ - vendor/assets/javascripts/leaflet_numbered_markers.js.erb
58
+ - vendor/assets/stylesheets/leaflet_numbered_markers.css
59
+ homepage: https://gist.github.com/comp615/2288108
60
+ licenses:
61
+ - MIT
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.4.5.1
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Add a number aside Leaflet marker
83
+ test_files: []