initial logic for map API with url patterns