내가 연주되었으로 주변에 아폴로 개발자의 API 를 조금 구축 기본적인 반응하 soem Starva 활동을 표시한다. 저장소 찾을 수 있습니다 여기에.
제가 지도를 렌더링하는 활동 경로에서 구성 요소입니다.
const StravaMap = withScriptjs(
withGoogleMap(({ zoom, activity }: StravaMapProps) => {
const center = {
lat: activity.start_latitude,
lng: activity.start_longitude,
};
const path = activity.map.summary_polyline
? createPath(polyline.decode(activity.map.summary_polyline))
: [];
return (
<GoogleMap
defaultZoom={zoom}
defaultCenter={center}
defaultOptions={mapOptions}
>
<Marker position={center} />
{path.length > 0 && (
<Polyline options={polyLineOptions} path={path} visible />
)}
</GoogleMap>
);
}),
);
원본 파일에 여기에.
다각형을 렌더링합 벌금,하지만 나는 지금도하는 방법을 알아낼 수 있을 확대 지도를 맞 th epolyline 로습니다.
수도 앱 soemthing 지 명확한 아이디어를 얻는 방법을 보유선 인스턴스를 얻을 경계 또는지도 설정 범위.
내가 알고있는 방법을 버퍼 poluyline 경로에 따라 그러면 나를 구해주고 경계를 어떻게 설정할 수 있습니다 바인딩을 사용하여 이 에 반응 Google 지도는 라이브러리?
감사합니다,