Skip to content

Commit c421141

Browse files
authored
Update Map.php
1 parent bd8b0df commit c421141

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/Map.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
class Map
1010
{
11-
// 支持在使用tx取坐标时使用天地图 tianditu
12-
public static $use = '';
1311
public static function get_request($url)
1412
{
1513
$context = stream_context_create(array(
@@ -30,9 +28,6 @@ public static function get_request($url)
3028
*/
3129
public static function tx($address, $lat = true)
3230
{
33-
if(self::$use == 'tianditu'){
34-
return \helper_v3\Map::get_lat($address);
35-
}
3631
$key = get_config('tx_map_key');
3732
$address = urlencode($address);
3833
$url = "https://apis.map.qq.com/ws/geocoder/v1/?address=" . $address . "&key=" . $key;
@@ -53,7 +48,7 @@ public static function tx($address, $lat = true)
5348
* @return [type] [description]
5449
*/
5550
public static function tx_lat($lat, $lng, $full = false)
56-
{
51+
{
5752
$key = get_config('tx_map_key');
5853
$url = "https://apis.map.qq.com/ws/geocoder/v1/?location=" . $lat . ',' . $lng . "&key=" . $key;
5954
$res = self::get_request($url);
@@ -70,7 +65,7 @@ public static function tx_lat($lat, $lng, $full = false)
7065
* @return [type] [description]
7166
*/
7267
public static function gaode($address, $show_full = false)
73-
{
68+
{
7469
$key = get_config('gd_map_key');
7570
$address = urlencode($address);
7671
$url = 'https://restapi.amap.com/v3/geocode/geo?address=' . $address . '&output=json&key=' . $key;

0 commit comments

Comments
 (0)