When it is top-down and using a tilemap, the speed of a moving object is directly linked to the tile id on a certain position. Use the tilemaps's translations from position to tile index to find the tile id. Use the found tile id to influence the speed.
You want a beter explanation, provide better info, best info is a capx.