Please write a web page for me using Leaflet. When I left-click on the map:
- Call API
/api/v1/tz
Response:curl "http://localhost:8080/api/v1/tz?lng=116.3883&lat=39.9289"
Show the{ "timezone": "Asia/Shanghai", "abbreviation": "CST", "offset": 28800 }
timezone
&abbreviation
&offset
returned by the interface as a marker, and the coordinates are the coordinates clicked by the user. - Call API
/api/v1/tz/geojson
Response:curl http://localhost:8080/api/v1/tz/geojson??lng=116.3883&lat=39.9289
Show the GeoJSON returned by the interface on the map.{ "geometry": { "coordinates": [ [ [ [12.457, 41.903], [12.457, 41.905], [12.455, 41.907], [12.450, 41.906], [12.445, 41.901], [12.454, 41.900], [12.454, 41.901], [12.458, 41.901], [12.457, 41.903], [12.456, 41.902], [12.457, 41.903] ] ] ], "type": "MultiPolygon" }, "properties": { "tzid": "Europe/Vatican" }, "type": "Feature" }
Other requirements:
- The added Marker left-click pops up detailed information, including
timezone
&abbreviation
&offset
- If the added polygon has been added before, please do not add it repeatedly,
judge according to
tzid
I want a full screen map