validate if urls are actual urls
removed getTileUrl() call
added assert statement to detect if img is undefined