Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a result variable which contains the value like this

var result=52.2323,-1.12121,52.0000,-1.3434343,52.88989626,-1.363894732,52.0000,-1.3434343

How can i split this variable?

so that i can pass this values separately to following code:

MarkerSecond = L.marker([52.88989626, -1.363894732], { icon: greenIcon }).addTo(WktLayers);
Posted
Updated 22-Dec-15 19:51pm
v2

Google is always your best friend.

Please do have a look at the first result I found.

Javascript Split


Hope it helps solve your problem. :)
 
Share this answer
 
var result = result + '';
var str_array = result.split(',');

This Solved My Problem :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900