Bing Map Part 2 (the split)


I know the image has nothing to do with the text.

Last time we made a list delimited by “|” in Javascript. This time we will split that up in order to use it.  Lets just look at a few:

window.onload = function()
var states = [
“Alaska|Juneau|58.301935| -134.419740”,
“Arkansas|Little Rock|34.736009|-92.331122”,

for (states i = 0; i < states.length; i++)


var res = str.split(“|”);

var newStateListItem = document.createElement(“li”);
var stateListValue = document.createTextNode(“state name: ” + res[0] );
var stateListValue = document.createTextNode(” captital name:” + res[1] );



This will demonstrate this in a list.  Like so:


So as you can see we have split the array into four  parts.

In part 3 I’ll take the lat & log data from our data set and make pins on the Bing Map.