/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var latLngStr:String = "(51.559340379647914, -0.2835899591445923)"; trace(latLngStr); var lat:Number = Number(latLngStr.substring(1, latLngStr.length-1).split(",")[0]); trace(lat); var lng:Number = Number(latLngStr.substring(1, latLngStr.length-1).split(",")[1]); trace(lng); // OUTPUT // (51.559340379647914, -0.2835899591445923) // 51.559340379647914 // -0.2835899591445923