As the increasing demands of military detection, wireless communication and remote sensing make the spectrum even more crowded, radar sequence design meeting spectral compatibility requirement is a challenging and urgent problem. This study is devoted to designing optimised phase-coded sequences which keep spectral-compatible with the overlaid electromagnetic radiators and at the same time optimise the signal-to-interference-plus-noise ratio (SINR). First, an intelligent dynamic spectrum information around the radar system is achieved by a radio environmental map. The information is introduced to form a constrained optimisation process aimed at improving the spectral compatibility and the radar detection performance. Second, the unimodularity requirement is necessary to make full use of transmit power and a similarity constraint is enforced to keep desired ambiguity function feature. Third, to resolve the resulting non-convex optimisation quadratically constrained quadratic problem, a relaxation and a randomisation procedure are applied. Therefore, the technique behaves a polynomial computational complexity. Finally, the performance analysis is given to show its effectiveness in terms of the SINR, the spectral shape, and the resulting auto-correlation function.