1 Star 1 Fork 0

Collin / simple-map

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

地图应用

本项目为研究性质项目,主要研究地图相关应用,如计算定位点与所查店铺间距离,共享定位等。

线上部署了一个demo,可以看看演示效果:

https://map.7ve.cn/

如需在线体验后台,自己添加测试数据,请加群@群主获取账号密码

环境要求

  1. Linux/MAC, PHP 7.0 +, Redis
  2. Swoole 2.1.3 +
  3. NB Framework

安装

1.下载项目

git clone https://github.com/nbcx/map.git
cd /path/to/map
git clone https://github.com/nbcx/framework.git nb

or

git clone https://github.com/nbcx/map.git
cd /path/to/map
composer install
  1. 部署 将项目源文件复制到网站根目录。

确保项目tmp文件有读写权限

项目根目录下的config.inc.php文件为配置文件,需在里面填写正确的数据库信息:

//数据库配置
'dao' => [
    'driver'	=> 'mysql',
    'host' 		=> 'data.nb.cx',
    'port' 		=> '3306',
    'dbname'    => 'map', //数据库名子
    'user' 		=> 'dev',  数据库用户名
    'pass' 		=> '123456', 数据库密码
    'connect'   => 'false',
    'charset' 	=> 'UTF8',
]

添加Nginx配置

server {
    listen 80;
    server_name yourdoname.com;
    index index.php;

    location / {
        rewrite ".+" "/index.php" last;
    }

    location ~ .*\.php {
        root /path/to/map/public/;
        fastcgi_pass   127.0.0.1:9100;
        fastcgi_index index.php;
        include fastcgi.conf;
    }

    location ~ .*\.(svg|woff2|map|html|woff|ttf|ico|css|js|gif|jpg|jpeg|png|bmp|swf)$ {
        root /path/to/map/;
        expires 90d;
    }
}

以上方式不能使用共享定位的功能,如需使用,需要使用Swoole和Redis,启动Websocket服务。如下:

cd bin
./server start

#根据你的php安装方式,上面的命令可能执行错误,你可以用你自己完整的php路径方式启动:

/path/to/php server start

项目开发中,一些配置为开发者自己本地配置,如想自己部署体验,需自行修改,遇到问题可加群@群主解答。

功能

  • 计算定位点与所查店铺间距离
  • 共享定位(不完善)

技术交流

QQ群: 1985508

MIT License Copyright (c) 2019 Collin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

一个地图应用。基于百度地图实现的共享定位。搜索附近的店铺,以及店铺与当前定位的距离! 展开 收起
HTML
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
HTML
1
https://gitee.com/nbcx/map.git
git@gitee.com:nbcx/map.git
nbcx
map
simple-map
master

搜索帮助

14c37bed 8189591 565d56ea 8189591