MySQL查询提取多个Lat / Long坐标并在Google地图上绘图

时间:2013-11-01 16:30:53

标签: mysql

我在下面有以下MySQL查询。我正在尝试提取四组坐标,然后在我的自定义Google v3 API页面上绘制它们。 (我也需要它用蓝线“连接”点)

以下是原始“printable_text”列数据的样子:

Grids  : T04SR08W09NW

BestFit: 38.204326/-89.995942 38.204330/-89.993452
       : 38.203490/-89.993451 38.203486/-89.995941
PreMark: NO        Directional Boring: NO      Depth>7Ft: NO

这是我当前的MySQL查询:

SELECT ticket
     , SUBSTR(printable_text
             , LOCATE('BestFit: ',printable_text)+9
             , LOCATE('PreMark:', printable_text) - LOCATE('BestFit: '
             , printable_text) - 9) AS coord
     , REPLACE((SUBSTR(printable_text
                      , LOCATE('BestFit: ',printable_text)+9
                      , LOCATE('PreMark:', printable_text) - LOCATE('BestFit: '
                      , printable_text) - 9)),'/',',') AS coord
  FROM tickets 
 WHERE ticket = 'A3041073'

这是我到目前为止提取的内容:

38.204326/-89.995942 38.204330/-89.993452       : 38.203490/-89.993451 38.203486/-89.995941
38.204326,-89.995942 38.204330,-89.993452       : 38.203490,-89.993451 38.203486,-89.995941

我猜我需要摆脱“/”,“空格”,“冒号”,并将四个坐标输入我的Google API进行绘图和连接..?

0 个答案:

没有答案