updated osmap.inc with db_query function

upadated and edited osmap.inc with db_query function and create_xml()