谷歌地图- Regex格式的文本字符串与GPS坐标



尝试将此列表(超过100,000行)转换为google热点图的格式化坐标。

us,waynesboro,Waynesboro,GA,,33.0897222,-82.0158333
us,waynesville,Waynesville,GA,,31.2291667,-81.7894444
us,wayside,Wayside,GA,,33.0611111,-83.6050000
us,weather wood,Weather Wood,GA,,33.6775000,-84.2980556

转换为:

new google.maps.LatLng(37.783383, -122.439594),

我可以使用

/D.D+/g 

选择我不想要的文本,然后用google语法替换它:

),rnew google.maps.LatLng( 
http://www.regexr.com/38qlc

最新更新