calculate gradient on a map - Search