{"id":18904353,"url":"https://github.com/relikd/django-map-location","last_synced_at":"2026-01-27T18:04:43.820Z","repository":{"id":246263218,"uuid":"820650790","full_name":"relikd/django-map-location","owner":"relikd","description":"Fully-static Leaflet location/position field without GeoDjango.","archived":false,"fork":false,"pushed_at":"2025-07-20T11:59:19.000Z","size":413,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-23T07:16:44.721Z","etag":null,"topics":["django","geodjango","leaflet","location","map","position","python","static"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-map-location/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relikd.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,"zenodo":null}},"created_at":"2024-06-26T22:49:25.000Z","updated_at":"2025-07-20T11:59:23.000Z","dependencies_parsed_at":"2025-04-15T03:34:42.306Z","dependency_job_id":"4c862e43-6b26-4ab2-aabd-97e3e9edce04","html_url":"https://github.com/relikd/django-map-location","commit_stats":null,"previous_names":["relikd/django-map-location"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/relikd/django-map-location","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fdjango-map-location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fdjango-map-location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fdjango-map-location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fdjango-map-location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relikd","download_url":"https://codeload.github.com/relikd/django-map-location/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fdjango-map-location/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28817795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:01:38.485Z","status":"ssl_error","status_checked_at":"2026-01-27T18:01:27.499Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["django","geodjango","leaflet","location","map","position","python","static"],"created_at":"2024-11-08T09:08:09.962Z","updated_at":"2026-01-27T18:04:43.792Z","avatar_url":"https://github.com/relikd.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django: Map-Location\n\nAdds a fully-static location field (Leaflet) to manage location-based data without the need for a full-fledged GeoDjango installation. ... when all you need is a visual position chooser.\n\n![screenshot](screenshot.jpg)\n\nFeatures: \n- Click on map or drag\u0026drop pin to select location\n- Reset button \u0026 use map-center button\n- Display selected location or map center coordinates with zoom level\n\n\n## Install\n\n1. Add to your INSTALLED_APPS\n\n```py\nINSTALLED_APPS = [\n    ...,\n    'map_location',\n]\n```\n\n2. Create Map-Location field\n\n```py\nfrom map_location.fields import LocationField\n\nclass Place(models.Model):\n    location = LocationField('Pos', blank=True, null=True, options={\n        'map': {\n            'center': [52.52, 13.40],\n            'zoom': 12,\n        },\n        # 'markerZoom': 18\n        # 'tileLayer': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n        # 'tileOptions': {\n        #     attribution: '© \u003ca href=\"http://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e',\n        # },\n        # 'locate': {\n        #     'showPopup': False,\n        # },\n    })\n```\n\n\n## Options Paramter\n\n| Key         | Info\n|-------------|------------------\n| map         | [Map Options](https://leafletjs.com/reference.html#map-option) (default: `{center: [20, -25], zoom: 2}`)\n| markerZoom  | Initial zoom scale (on load) – if a marker is set.  (default: `18`)\n| tileLayer   | [TileLayer](https://leafletjs.com/reference.html#tilelayer) urlTemplate (default: `\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\"`)\n| tileOptions | [TileLayer Options](https://leafletjs.com/reference.html#tilelayer-option) (default: `{}`)\n| locate      | [Leaflet.Locate Options](https://github.com/domoritz/leaflet-locatecontrol#possible-options) (default: `{showPopup: false}`)\n\n\n## Usage\n\nYou can access the location by its parts (`place.location.lat` \u0026 `place.location.long`) or by its string value (`str(place.location)` or just `place.location`) which will return a comma-separated string (`lat,long`). This string format is also used for database storage (with a precision of 6 digits, or up to 11 cm).\n\n\n## Example\n\nIf you export your location as json, you can use a fully static map:\n\n```py\n_JSON_ = {'loc': [place.location.lat, place.location.long]}\n```\n\n```html\n\u003cscript src=\"/static/leaflet/leaflet.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/static/leaflet/locate/L.Control.Locate.min.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"/static/leaflet/leaflet.css\" /\u003e\n\u003clink rel=\"stylesheet\" href=\"/static/leaflet/locate/L.Control.Locate.css\" /\u003e\n...\n\u003cdiv id=\"map-id\"\u003e\u003c/div\u003e\n...\n\u003cscript\u003e\n    const osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');\n    const map = L.map('map-id', {\n        layers: [osm],\n        center: [52.52, 13.40],\n        zoom: 14,\n    });\n    L.control.locate({\n        returnToPrevBounds: true,\n        showPopup: false,\n    }).addTo(map);\n    L.marker(L.latLng(_JSON_.loc)).addTo(map);\n    ...\n\u003c/script\u003e\n```\n\nSee [Leaflet](https://leafletjs.com/) docs for configuration options.\n\n\n## License\n\nThis project is licensed under MIT and includes:\n\n- v1.9.4 [Leaflet](https://github.com/Leaflet/Leaflet) (BSD 2-Clause License)\n- v0.81.1 [Leaflet.Locate](https://github.com/domoritz/leaflet-locatecontrol) (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelikd%2Fdjango-map-location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelikd%2Fdjango-map-location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelikd%2Fdjango-map-location/lists"}