Update jsMap.js

update design pattern,optimal performance