{"id":19694852,"url":"https://github.com/kpouer/kmapview","last_synced_at":"2026-06-14T15:32:57.244Z","repository":{"id":44392436,"uuid":"334524693","full_name":"kpouer/KMapView","owner":"kpouer","description":"A Swing component showing a map","archived":false,"fork":false,"pushed_at":"2024-01-15T08:46:13.000Z","size":246,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-10T09:24:10.498Z","etag":null,"topics":["java","map","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kpouer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-30T22:27:14.000Z","updated_at":"2023-12-19T21:07:19.000Z","dependencies_parsed_at":"2025-01-10T09:34:34.063Z","dependency_job_id":null,"html_url":"https://github.com/kpouer/KMapView","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpouer%2FKMapView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpouer%2FKMapView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpouer%2FKMapView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpouer%2FKMapView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpouer","download_url":"https://codeload.github.com/kpouer/KMapView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241005508,"owners_count":19892799,"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","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":["java","map","swing"],"created_at":"2024-11-11T19:24:50.123Z","updated_at":"2026-06-14T15:32:57.182Z","avatar_url":"https://github.com/kpouer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K-MapView\n![Java CI with Maven](https://github.com/kpouer/KMapView/workflows/Java%20CI%20with%20Maven/badge.svg)\n[![Maven Central](https://img.shields.io/maven-central/v/com.kpouer/k-mapview)](https://central.sonatype.com/artifact/com.kpouer/k-mapview/1.2.0/versions)\n\nA Swing component able to show a map\n\n## Introduction\n\nThis component will download from a tile server and show them.\nIt is a simple component able to add markers. But there is no search ability included.\n\n![OSM Map with widgets](/doc/OSMWithWidget.jpg)\n\n## Features\n\nThe map depends on a tile server. It can be OSM, but not necessary. You can find some examples here see https://wiki.openstreetmap.org/wiki/Tile_servers\nIt supports adding widgets to the map (dot, circles, or any other you create).\n\n## Tiles servers\n\nYou will have to find a tile server. One of the most common choice is OSM tiles.\nYou can find various tiles servers here https://wiki.openstreetmap.org/wiki/Tile_servers\nBeware, the term of use varies and most of them will not allow you to use them in a commercial product.\n\nTiles will be stored in a disk cache, but that cache is not managed by this component, it is up to you\nto clean it when you want.\n\nRetrieving queries can be load balanced between multiple servers.\n\n## Example\n\n```java\nimport com.kpouer.mapview.tile.DefaultTileServer;\nimport com.kpouer.mapview.tile.cache.ImageCacheImpl;\n\nimport javax.swing.*;\nimport java.io.IOException;\n\npublic class Sample {\n    public static void main(String[] args) throws IOException {\n        JFrame frame = new JFrame();\n        MapView mapView = new MapView(new DefaultTileServer(256,\n                                                                1,\n                                                                18,\n                                                                2,\n                                                                new ImageCacheImpl(\"Waze\", \"cache\", 1000),\n                                                                \"https://a.tile.openstreetmap.org/${z}/${x}/${y}.png\",\n                                                                \"https://b.tile.openstreetmap.org/${z}/${x}/${y}.png\",\n                                                                \"https://c.tile.openstreetmap.org/${z}/${x}/${y}.png\")));\n        String wkt2 = \"POLYGON((12.493134831869419 41.91785801245087,12.559739446127232 41.88796130217409,12.4316800589202 41.874669382200494,12.469788884603794 41.96101743431704,12.493134831869419 41.91785801245087))\";\n        Polygon polygon = WKT.parseShape(wkt2);\n        PolygonMarker marker = new PolygonMarker(polygon, 5, new Color(1.0f, 0.0f, 0.0f, 0.3f), true);\n        mapView.addMarker(marker);\n        contentPane.setMouseLocationLabelVisible(false);\n        frame.setContentPane(contentPane);\n\n        frame.setSize(800, 600);\n        frame.setVisible(true);\n    }\n}\n```\n\n## Dependency\n\nAvailable through Maven central\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.kpouer\u003c/groupId\u003e\n    \u003cartifactId\u003ek-mapview\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Note\n\nThe api is still under development and things might change\n\n## Licence\nK-MapView is open source and licensed under the Apache License 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpouer%2Fkmapview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpouer%2Fkmapview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpouer%2Fkmapview/lists"}