google-map-static-image-generator 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 +7 -0
 - data/lib/google_map_static_image.rb +25 -0
 - metadata +45 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 54f1aa08f6692b02e86d62878a435d883dcdfc96
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f6432f0c242a32f9693c1d1b53f3afc76548fcac
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1fd8455b0f7cf5b56f6e810c29f042848001bf27096d47abebfa60525ad6905c54af217b558b9eb66c953bfbac10826013da2a0fec4cc272912ca88204215e67
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d3a6de89494052b03d991d63881fc16051d94284449d04d3ee0bc5ae73b0ae2fa781d612587c85f08d972f14beaaf38b61a5adf4c545edc2903ee3c4f9cd7374
         
     | 
| 
         @@ -0,0 +1,25 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class GoogleMapStaticImage
         
     | 
| 
      
 2 
     | 
    
         
            +
              require "httparty"
         
     | 
| 
      
 3 
     | 
    
         
            +
              require "debugger"
         
     | 
| 
      
 4 
     | 
    
         
            +
              def get_response(api_key,markers,option={})
         
     | 
| 
      
 5 
     | 
    
         
            +
                
         
     | 
| 
      
 6 
     | 
    
         
            +
                
         
     | 
| 
      
 7 
     | 
    
         
            +
                url = "https://maps.googleapis.com/maps/api/staticmap"
         
     | 
| 
      
 8 
     | 
    
         
            +
                url1= "http://192.168.0.19:3041"
         
     | 
| 
      
 9 
     | 
    
         
            +
                
         
     | 
| 
      
 10 
     | 
    
         
            +
                query = Hash.new
         
     | 
| 
      
 11 
     | 
    
         
            +
                query[:api_key]   = api_key
         
     | 
| 
      
 12 
     | 
    
         
            +
                query[:size]      = "1024x1024"
         
     | 
| 
      
 13 
     | 
    
         
            +
                query[:scale]     = 2
         
     | 
| 
      
 14 
     | 
    
         
            +
                query[:style]     = option[:style].map {|key,val| "#{key}:#{val}"}.join("|")                                       unless option[:style].nil?
         
     | 
| 
      
 15 
     | 
    
         
            +
                query[:path]      = option[:path].map {|key,val| "#{key}:#{val}"}.join("|")                                        unless option[:path].nil?  
         
     | 
| 
      
 16 
     | 
    
         
            +
                query[:path]      = [query[:path],option[:location].map {|key,val| "#{val}"}.join("|")].join("|")                  unless option[:location].nil?
         
     | 
| 
      
 17 
     | 
    
         
            +
                query[:markers]   = option[:markers].map { |val| val.join("|")}                                                    unless option[:markers].nil? 
         
     | 
| 
      
 18 
     | 
    
         
            +
                                           
         
     | 
| 
      
 19 
     | 
    
         
            +
                response = HTTParty.get("#{url1}", :query=>query)
         
     | 
| 
      
 20 
     | 
    
         
            +
                response = HTTParty.get("#{url}", :query=>query)
         
     | 
| 
      
 21 
     | 
    
         
            +
                return response.parsed_response
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              end 
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,45 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: google-map-static-image-generator
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Abhishek Sharma
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-10-13 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies: []
         
     | 
| 
      
 13 
     | 
    
         
            +
            description: Gem to expand usage of google map static image api with rails
         
     | 
| 
      
 14 
     | 
    
         
            +
            email: abhishek.sharma@medma.in
         
     | 
| 
      
 15 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 16 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 17 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 18 
     | 
    
         
            +
            files:
         
     | 
| 
      
 19 
     | 
    
         
            +
            - lib/google_map_static_image.rb
         
     | 
| 
      
 20 
     | 
    
         
            +
            homepage: 
         
     | 
| 
      
 21 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 22 
     | 
    
         
            +
            - NONE
         
     | 
| 
      
 23 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 24 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 25 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 26 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 27 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 28 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 30 
     | 
    
         
            +
              - - '>='
         
     | 
| 
      
 31 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 32 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 33 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 34 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 35 
     | 
    
         
            +
              - - '>='
         
     | 
| 
      
 36 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 37 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 38 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 39 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 40 
     | 
    
         
            +
            rubygems_version: 2.3.0
         
     | 
| 
      
 41 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 42 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 43 
     | 
    
         
            +
            summary: Hello! This is library to get the google map static image as file object
         
     | 
| 
      
 44 
     | 
    
         
            +
              with different params
         
     | 
| 
      
 45 
     | 
    
         
            +
            test_files: []
         
     |