24 lines
678 B
Java
24 lines
678 B
Java
package com.example.saferoute;
|
|
|
|
import retrofit2.Call;
|
|
import retrofit2.http.Body;
|
|
import retrofit2.http.GET;
|
|
import retrofit2.http.Header;
|
|
import retrofit2.http.POST;
|
|
import retrofit2.http.Query;
|
|
|
|
public interface ORSService {
|
|
@GET("v2/directions/foot-hiking")
|
|
Call<ORSResponse> getFootRoute(
|
|
@Query("api_key") String apiKey,
|
|
@Query("start") String start, // Формат: "lon,lat"
|
|
@Query("end") String end // Формат: "lon,lat"
|
|
);
|
|
|
|
@POST("v2/directions/foot-walking/geojson")
|
|
Call<ORSResponse> getMultiPointRoute(
|
|
@Header("Authorization") String apiKey,
|
|
@Body ORSRequest body
|
|
);
|
|
}
|