Skip to content

drogus/dotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotter

Simple library for drawing dots (for google maps).

Usage

First you must create a tile (which will represent google maps tile). Tile takes tile start (latlng coordinates of upper left corner) and zoom. More on google maps tiles: code.google.com/apis/maps/documentation/overlays.html#Google_Maps_Coordinates

tile_start = Dotter::LatLng.new(tile_start_latitude, tile_start_longitude)
tile = Dotter::Tile.new(tile_start, zoom)

tile.places = places_array # places should respond_to latitude and longitude

dotter = Dotter::Dotter.new(:dots => tile.convert_places)
dotter.generate_image # Magick::Image instance containing transparent image with dots

This will generate image of a tile with dots representing given places.

Dots are black by default. If you want to color them, objects passed as a dots should respond_to :dot_color method. dot_color should return string representing color, for list of available color names visit: www.imagemagick.org/RMagick/doc/imusage.html#color_names

TODO: write short note about implementing it in google maps

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but

    bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published