<?php
/**
* HMT Bus GO! (WXSS VER.)
*
* @author CRH380A-2722 <[email protected]>
* @copyright 2016-2017 CRH380A-2722
* @license MIT
* @note 获取站点位置
*/
header("Content-Type: application/json; charset=utf-8\n");
require_once '../inc.Config.php';
$stops = $SCAUBus->BusData->getStopLocation();
$bus = $SCAUBus->RealTimeBus->getBusLocation();
$data = array();
$i = 1;
foreach ($bus['online'] as $online) {
$data[] = array(
'id' => $i,
'title' => $online['busNum'] . ' @ ' . $online['line'] . ' [终端在线]',
'longitude' => $online['position'][0] - 0.000150,
'latitude' => $online['position'][1] + 0.000070,
'iconPath' => '/source/map-marker/marker-bus-online.png',
'width' => 40,
'height' => 40
);
$i++;
}
foreach ($bus['offline'] as $offline) {
$data[] = array(
'id' => $i,
'title' => $offline['busNum'] . ' [终端离线]',
'longitude' => $offline['position'][0] - 0.000150,
'latitude' => $offline['position'][1] + 0.000070,
'iconPath' => '/source/map-marker/marker-bus-offline.png',
'width' => 40,
'height' => 40
);
$i++;
}
foreach ($stops as $stop) {
$data[] = array(
'id' => $stop['stopId'] + 50,
'title' => $stop['title'],
'longitude' => $stop['position'][0] - 0.000150,
'latitude' => $stop['position'][1] + 0.000070,
'iconPath' => '/source/map-marker/marker-stop.png',
'width' => 40,
'height' => 40
);
}
print json_encode($data);
die();
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
项目初览 实现实时巴士小程序,开发工具导入项目即可查看源码分享 ## 小程序设计过程 小程序是一个易上手的东西, 对于新手来说,多看官方文档,可以初步做出比较完整的小程序,正是因为简单上手,功能实现简单,小程序是越来越火,商业价值也越来越大。 #### 1.项目工具和文档 1. 微信web开发者工具:[微信小程序官网](https://mp.weixin.qq.com/debug/wxadoc/dev/) 这是个比较好用的编辑器,对于小程序编辑很方便。 2. 开发文档:[微信小程序宝典秘籍](https://www.w3cschool.cn/weixinapp/9wou1q8j.html) 通过这个查找微信小程序的API,组件,框架等等。 3. 图标库: [Iconfont-阿里巴巴矢量图标库](http://www.iconfont.cn/) 这个可以找到自己想要的几乎所有的小图标,十分方便。 4. Easy Mork: [easy-mock](www.easy-mock.com) 用于后台的模拟,得到JSON数据; 5. weui框架引入 更多内容请下载查看
资源推荐
资源详情
资源评论
收起资源包目录
Real time bus system.zip (62个子文件)
Real time bus
实时巴士php后端
HMT-Bus-GO-WXSS_BACK-END-master
wxss.getStopList.php 525B
wxss.getLineList.php 904B
wxss.GetLocation.php 1KB
wxss.getLineInfo.php 777B
LICENSE 1KB
wxss.getStopInfo.php 782B
wxss.refreshStop.php 703B
wxss.getRealTimeStatus.php 536B
wxss.GetPolyline.php 749B
wxss.GetTimetable.php 982B
wxss.stopSearch.php 591B
实时巴士前端
HMT-Bus-GO-WXSS_FRONTEND-master
WXSSCODE.jpg 234KB
pages
stopSearch
index.wxml 711B
index.js 816B
index.json 51B
index.wxss 8KB
stopIndex
index.wxml 1KB
index.js 1KB
index.json 51B
index.wxss 7KB
lineIndex
index.wxml 2KB
index.js 1KB
index.json 51B
index.wxss 7KB
timetable
index.wxml 937B
index.js 2KB
index.json 48B
index.wxss 8KB
busMap
index.wxml 4KB
index.js 3KB
index.json 45B
stopInfo
index.wxml 771B
index.js 1KB
index.json 45B
index.wxss 7KB
lineInfo
index.wxml 2KB
index.js 2KB
index.json 45B
index.wxss 7KB
app.json 1KB
app.js 863B
LICENSE 1KB
weui.wxss 22KB
app.wxss 1KB
source
map-marker
marker-you.png 5KB
marker-stop.png 5KB
marker-location.png 5KB
marker-bus-offline.png 5KB
marker-bus-online.png 5KB
banner
stopbanner.png 5KB
timetablebanner.png 6KB
linebanner.png 5KB
searchbanner.png 6KB
icon
realtime.png 4KB
stop.png 4KB
busmap-selected.png 3KB
stop-selected.png 4KB
line.png 4KB
busmap.png 3KB
line-selected.png 4KB
realtime-selected.png 4KB
QRCODE.jpg 73KB
共 62 条
- 1
资源评论
静香是个程序媛
- 粉丝: 3700
- 资源: 563
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功