node.js - 用传单在地图上显示点
问题描述
我的数据库中有大约 150k 点,我需要使用 axios req 从数据库中获取它们,然后在地图上显示它们。我的应用程序使用 PRN 框架。用nodejs构建这条路线并做出反应传单的最佳方法是什么?有任何选项可以执行分页方法吗?
解决方案
You can use PostGIS to insert and select data from the database. I did something like this on a personal project. You can check it out here:
https://github.com/gwerle/sharedgis-backend
https://github.com/gwerle/sharedgis-frontend
To select from database using PostGIS you can do something like this:
SELECT column_1, column_2, ST_X(geom::geometry), ST_Y(geom::geometry) FROM table
You can add a marker in each point using the <Marker>
tag (docs here https://react-leaflet.js.org/docs/example-popup-marker).
推荐阅读
- gstreamer - 实际上是否可以使用 GStreamer 将字幕混合到 .mkv 文件中?
- sql - SQL根据值将一列拆分为两列并使用列
- python - 删除 Python 字典中的嵌套键
- python - Django 'Image' 对象没有属性 '_committed'
- node.js - 如何在 mongoose 中获取数组中最后一个元素的数据?
- javascript - express 项目中的嵌套路由
- security - Ansible 的 docker_container 模块不支持 cap_drop 来限制对内核 caps 的访问
- c++ - C ++打印模板容器错误(错误:'operator <<'的模糊重载)理解?
- laravel - 在 Laravel 中填写显示先前填写的数据的表单后,使用什么来显示成功消息?
- javascript - 无法使用带有 X509 用户的 mongoose 连接到 Mongo DB