Willison分享地图插件实践:让Claude先参考旧实现,再组合功能
Simon Willison称,他让Claude Fable 5.2先阅读两个现有地图插件和本地示例,再组合功能并尝试扩展,完成了新插件的大部分工作。一个具体结果是先显示GeoJSON的SVG预览,滚动进入视野后再加载WebGL。文章提供提示词和浏览器演示,插件目前为初始Alpha版本。
提供参考现有实现后组织编码任务的具体提示词。原文正文+原站 RSS 时间核验,发布页确认Alpha状态;完成比例属作者自述,功能未复测。
The first new Datasette geospatial plugin in quite a while! This one combines the excellent MapLibre GL library with OpenFreeMap, the free vector map server operated by Zsolt Ero (you should sponsor Zsolt on GitHub.)
I built most of this with a single prompt to Claude Fable 5.2:
Look at datasette-cluster-map and datasette-leaflet-geojson plugins, then look at ~/dev/tools/openfreemap-demo.html - then build a brand new Datasette plugin that uses maplibreGL and openfreemap and combines the features of those other two plugins - but be creative and think outside the box for other useful features the plugin might have
"Be creative and think outside the box" resulted in a few neat ideas - my favorite is that it displays SVG previews of GeoJSON shapes, then loads a WebGL preview only when they scroll into view.
I also had Claude build a comprehensive demo which works in the latest Datasette Lite, so you can visit this link to load the plugin and a demo database in your browser via Pyodide and WebAssembly.
I like this demo page showing both GeoJSON shapes and lat/lon points on the same map:

来源:Simon Willison · simonwillison.net