Should be fine. Check that the adapter can supply enough current (the adapter should be rated in milliamps or amps, this needs to be equal to or higher than the rating on the GPS).
Also be sure that the polarity of the connector is the same for both (most likely centre positive).