From Wikipedia:

The name Pontianak refers to a story about ghosts that people in West Kalimantan refer to as Pontianak (a ferocious female ghost in Malay); it was a ghosts’ haunt until Syarif Abdurrahman Alkadrie and his army fought and expelled the ghosts who attacked them by firing cannons. He then built a mosque and a palace, exactly on the location of the ghosts’ haunt, and settled there. The mosque and palace became the first buildings in the city, and to this day locals fire bamboo cannons on Ramadan and other holidays in memory of this.