The median (antimedian) set of a profile of vertices of a graph G is the set of vertices. that minimise (maximise) the remoteness value. The median and antimedian problem of profiles on graphs is one of the basic models of desirable (as well as obnoxious) facility location problem in networks. The medians and antimedians behave nicely in classes of graphs like complete graphs, hypercubes and paths. In this paper, we study more classes of graphs in which the medians and antimedians have a nice structure, which admit a scale-embedding into hypercubes known as l(1)-graphs and design algorithms for both (median and antimedian) problems. We particularly discuss the cases of half-cubes, Johnson graphs and cocktail-party graphs.