I have some code which updates an elevation grid.
var m_grid=document.getElementById(m_gridID);
var colorGrid=document.getElementById(m_gridColorID);
colorGrid.color = colorStr;
m_grid.setAttribute("xDimension", m_width);
m_grid.setAttribute("zDimension", m_slices);
m_grid.setAttribute("xspacing", 20.25/(m_width-1));
m_grid.setAttribute("zspacing", 6.81/(m_slices-1));
m_grid.setAttribute("height", gridStr);
//reload
var container = m_grid.parentNode;
var content = container.innerHTML;
container.innerHTML = content;
Is it possible to do this more elegantly and/or faster? Is it possible to set height and color as arrays rather than as strings? Is it possible to set height or color for single points? Is it possible not to reload the part of the document with the grid?