{"id":15062345,"url":"https://github.com/bluefeet/geo-coordinates-gmap","last_synced_at":"2026-02-15T16:40:26.949Z","repository":{"id":600603,"uuid":"236471","full_name":"bluefeet/Geo-Coordinates-GMap","owner":"bluefeet","description":"Routines for converting decimal lat/lon to Google Map tiles, and back again.","archived":false,"fork":false,"pushed_at":"2021-03-09T19:54:13.000Z","size":94,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T16:42:07.112Z","etag":null,"topics":["cpan","perl5"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Geo::Coordinates::GMap","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluefeet.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-06-25T20:22:55.000Z","updated_at":"2021-03-09T19:54:17.000Z","dependencies_parsed_at":"2022-07-05T02:32:18.022Z","dependency_job_id":null,"html_url":"https://github.com/bluefeet/Geo-Coordinates-GMap","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/bluefeet/Geo-Coordinates-GMap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FGeo-Coordinates-GMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FGeo-Coordinates-GMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FGeo-Coordinates-GMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FGeo-Coordinates-GMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluefeet","download_url":"https://codeload.github.com/bluefeet/Geo-Coordinates-GMap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FGeo-Coordinates-GMap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270617870,"owners_count":24617123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpan","perl5"],"created_at":"2024-09-24T23:34:39.433Z","updated_at":"2025-10-07T06:26:37.688Z","avatar_url":"https://github.com/bluefeet.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nGeo::Coordinates::GMap - Routines for converting decimal lat/lon to Google\nMap tiles, and back again.\n\n# SYNOPSIS\n\n```perl\nuse Geo::Coordinates::GMap;\nmy ($tile_x, $tile_y) = coord_to_gmap_tile( $lat, $lon, $zoom );\nmy ($new_tile_x, $new_tile_y) = zoom_gmap_tile( $tile_x, $tile_y, $old_zoom, $new_zoom );\nmy ($x, $y) = gmap_tile_xy( $tile_x, $tile_y, $scale );\n```\n\n# DESCRIPTION\n\nWhile working on the mapping tools on toxicrisk.com I came to the conclusion\nthat we were dealing with too much data to make everything a GMarker, even\nwhen using the marker manager.\n\nSo, I needed to generate static map tile images.  But, to do this, I needed a\nway to convert my decimal lat/lon points in to tile numbers, and the pixel\nvalues on those tiles.\n\nThis module makes this process simple and accurate.\n\n# FUNCTIONS\n\n## coord\\_to\\_gmap\\_tile\n\n```perl\nmy ($tile_x, $tile_y) = coord_to_gmap_tile( $lat, $lon, $zoom );\n```\n\nGiven a decimal latitude and longitude, and a Google Maps zoom level (0 being farthest away\nand 20 being the closest that I'm aware of that you can get), this function will return the\nGMap tile location as a fractional x and y coordinate.\n\n## zoom\\_gmap\\_tile\n\n```perl\nmy ($new_tile_x, $new_tile_y) = zoom_gmap_tile( $tile_x, $tile_y, $old_zoom, $new_zoom );\n```\n\nConverts fractional tile coordinates, as created by coord\\_to\\_gmap\\_tile(), from one\nzoom level to another.\n\n## gmap\\_tile\\_xy\n\n```perl\nmy ($x, $y) = gmap_tile_xy( $tile_x, $tile_y, $scale );\n```\n\nGiven a tile's x and y coordinate as provided by coord\\_to\\_gmap\\_tile(), this function\nwill return the pixel location within the tile.\n\nThe `$scale` argument may be supplied which can be used to produce high-res tiles.\nAt this time Google states that the scale can be `1`, `2`, or `4` (only Google\nMaps API for Work customers can use `4` with the Google Maps API).  If not specified\nthe scale will default to `1`.\n\n# TODO\n\n- Implement a routine to convert tile coordinates back in to lat/lon decimal\ncoordinates.\n\n# SUPPORT\n\nPlease submit bugs and feature requests to the\nGeo-Coordinates-GMap GitHub issue tracker:\n\n[https://github.com/bluefeet/Geo-Coordinates-GMap/issues](https://github.com/bluefeet/Geo-Coordinates-GMap/issues)\n\n# AUTHOR\n\n```\nAran Clary Deltac \u003cbluefeet@gmail.com\u003e\n```\n\n# LICENSE\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluefeet%2Fgeo-coordinates-gmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluefeet%2Fgeo-coordinates-gmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluefeet%2Fgeo-coordinates-gmap/lists"}