{"id":15499903,"url":"https://github.com/stefanocudini/leaflet-layerjson","last_synced_at":"2025-03-17T14:17:34.207Z","repository":{"id":54823043,"uuid":"8565385","full_name":"stefanocudini/leaflet-layerJSON","owner":"stefanocudini","description":"Build dynamic JSON Layer via Ajax/JSONP with caching","archived":false,"fork":false,"pushed_at":"2023-08-11T10:14:23.000Z","size":210,"stargazers_count":93,"open_issues_count":0,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-10T15:07:17.325Z","etag":null,"topics":["json","jsonp","leaflet","leaflet-layer","web-mapping","webgis","webmapping"],"latest_commit_sha":null,"homepage":"https://opengeo.tech/maps/leaflet-layerjson/","language":"JavaScript","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/stefanocudini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-03-04T21:31:56.000Z","updated_at":"2025-02-25T06:22:45.000Z","dependencies_parsed_at":"2024-01-22T00:03:27.428Z","dependency_job_id":null,"html_url":"https://github.com/stefanocudini/leaflet-layerJSON","commit_stats":{"total_commits":134,"total_committers":9,"mean_commits":14.88888888888889,"dds":0.08208955223880599,"last_synced_commit":"4841933541bc4066263eee84b9aa1cd39d808635"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-layerJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-layerJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-layerJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-layerJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanocudini","download_url":"https://codeload.github.com/stefanocudini/leaflet-layerJSON/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244047646,"owners_count":20389206,"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":["json","jsonp","leaflet","leaflet-layer","web-mapping","webgis","webmapping"],"created_at":"2024-10-02T08:56:25.269Z","updated_at":"2025-03-17T14:17:34.185Z","avatar_url":"https://github.com/stefanocudini.png","language":"JavaScript","funding_links":["https://www.paypal.me/stefanocudini"],"categories":[],"sub_categories":[],"readme":"Leaflet JSON Layer\n============\n\n[![npm version](https://badge.fury.io/js/leaflet-layerjson.svg)](https://badge.fury.io/js/leaflet-layerjson)\n\nSimple way for transform any JSON data source in a Leaflet Layer!\n\nA Dynamic Leaflet Layer that load JSON data in layer in the form of markers with attributes\n\nand minimize remote requests with caching system\n\nCopyright 2023 Stefano Cudini\n\nIf this project helped your work help me to keep this alive by [Paypal **DONATION \u0026#10084;**](https://www.paypal.me/stefanocudini)\n\nTested in Leaflet 0.7 and 1.1\n\n# Options\n| Option\t\t| Data\t  | Description                       |\n| ------------- | --------| ----------------------------------------- |\n| url           | String  | remote url                                |\n| jsonpParam    | String  | callback parameter name for jsonp request append to url |\n| jsonpParam    | String  | callback parameter name for jsonp request append to url |\n| callData\t    | Function  | custom function for data source, params: (req: url|bbox, callback: func), return {abort: func} or jQuery jqXHR Object |\n| **Filtering**   |         |   |                                      \n| propertyItems\t| String  | json property used contains data items |\n| propertyLoc\t| String  | json property used as Latlng of marker, if is array: *['lat','lon']* select double fields |\n| locAsGeoJSON\t| String  | interpret location data as [lon, lat] value pair instead of [lat, lon] |\n| propertyTitle\t| String  | json property used as title in marker |\n| filterData\t| Function  | function for pre-filter data |\n| **Rendering**   |         |   |\n| dataToMarker\t| Function  | function that will be used for creating markers from json points |\n| layerTarget\t| L.Layer  | pre-existing layer to add markers(*L.LayerGroup*, *L.MarkerClusterGroup*) |\n| buildPopup\t| Function  | function popup builder |\n| optsPopup\t    | String  | popup options |\n| buildIcon\t    | Function  | function icon builder |\n| **Caching**     |         |  |\n| minZoom       | Number  \t| min zoom for call data |\n| caching       | Boolean   | remote requests caching |\n| cacheId       | Function  | function to generate id used to uniquely identify data items in cache |\n| minShift\t    | Number | min shift for update data(in meters) |\n| precision\t    | Number | number of digit send to server for lat,lng precision |\n| updateOutBounds| String | request new data only if current bounds higher than last bounds |\n| updateMarkers | Boolean | update all markers in map to last results of callData |\n\n# Events\n| Event\t\t\t | Data\t\t\t  | Description                               |\n| ---------------------- | ---------------------- | ----------------------------------------- |\n| 'dataloading' | {req: url|bbox} | fired before ajax/jsonp request, req is bbox if url option is null |\n| 'dataloaded'\t| {data: json}\t  | fired on ajax/jsonp request success |\n\n# Usage\n\n```\nvar l = new L.LayerJSON({url: \"search.php?lat1={lat1}\u0026lat2={lat2}\u0026lon1={lon1}\u0026lon2={lon2}\" });\nmap.addLayer(l);\n```\n\n# Where\n\n**Demos:**\n\n[https://opengeo.tech/maps/leaflet-layerjson](https://opengeo.tech/maps/leaflet-layerjson/)\n\n**Source:**\n\n[Github](https://github.com/stefanocudini/leaflet-layerjson) \n\n[Atmosphere](https://atmosphere.meteor.com/package/leaflet-layerjson)\n\n\n# Build\n\nThis plugin support [Grunt](https://gruntjs.com/) for building process.\nTherefore the deployment require [NPM](https://npmjs.org/) installed in your system.\n\nAfter you've made sure to have npm working, run this in command line:\n```\nnpm install\ngrunt\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanocudini%2Fleaflet-layerjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanocudini%2Fleaflet-layerjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanocudini%2Fleaflet-layerjson/lists"}