I have a variable called coordinates that is formatted like this:
var coordinates = 'lat / lon';
I now want to extract the single lat and lon coordinate from that variable to display it as the center in a Google Maps API Map. I have tried using slice to get the specific parts of the coordinates variable but depending on what coordinate it is the length is different, for example:
var coordinates = '49.7824 / 7.2413';
var coordinates = '8.5323 / -11.3336';
Is there any other way I could use those coordinates as the map center with the Maps API?