I found the following example sentence in my dictionary.
川沿いに歩く。Walk along a river.
I looked it up and found out that 川沿い is a noun. Then に should be a particle. But here clearly it doesn’t indicate the location of existence or the direction of motion. So what usage of に is this?