Let c be a proper k-coloring of a connected graph G. Let Pi = {S-1, S-2...,S-k} be the induced partition of V (G) by c, where S-i is the partition class having all vertices with color i. The color code c (Pi) (v) of vertex v is the ordered k-tuple (d (v,S-1), d (v, S-2),...,d (v ,S-k)), where d (v, S-i) = min {d (v,x) |x is an element of S-i}, for 1 <= i <= k. If all vertices of G have distinct color codes, then c is called a locating-coloring of G. The locating-chromatic number of G, denoted by chi(L) (G), is the smallest k such that G posses a locating k-coloring. Clearly, any graph of order n >= 2 has locating-chromatic number k, where 2 <= k <= n. Characterizing all graphs with a certain locating-chromatic number is a difficult problem. Up to now, all graphs of order n with locating chromatic number 2; n 1; or n have been characterized. In this paper, we characterize all trees whose locating- chromatic number is 3. We also give a family of trees with locating-chromatic number 4.