Sounds like you may be look for The Photographer's Ephemeris (and I think they just call it "Photo Ephemeris" these days.
They have web, phone, or tablet versions. It calculates the position of objects such as Sun, Moon, Milky Way, etc. but is aware of terrain elevations and it's my understand that this app renders the shadows on the map.
I don't have Photo Ephemeris, I have Sun Surveyor ... which does nearly the same thing but does not render shadows. So I augment it with a Clinometer app on my iPhone (I bought the app years ago and never bothered to change to Photo Ephemeris even though I think it is the better app these days).
[Edit: It looks like the topography shadows are only rendered if using Photo Ephermis 3D on iOS.]