Now we display lesser points on mobile

This commit is contained in:
muerwre 2019-03-04 16:46:25 +07:00
parent 31e042e945
commit c10ea8a685

View file

@ -6,6 +6,7 @@ import { ILatLng } from "$modules/Stickers";
import { InteractivePoly } from "$modules/InteractivePoly"; import { InteractivePoly } from "$modules/InteractivePoly";
import { Arrows } from "$modules/Arrows"; import { Arrows } from "$modules/Arrows";
import { KmMarks } from "$modules/KmMarks"; import { KmMarks } from "$modules/KmMarks";
import { isMobile } from "$utils/window";
interface Props { interface Props {
map: Map; map: Map;
@ -23,7 +24,7 @@ export class Poly {
this.poly = new InteractivePoly([], { this.poly = new InteractivePoly([], {
color: 'url(#activePathGradient)', color: 'url(#activePathGradient)',
weight: 6, weight: 6,
maxMarkers: 100, maxMarkers: isMobile() ? 20 : 100,
smoothFactor: 3, smoothFactor: 3,
}) })
.on('distancechange', this.onDistanceUpdate) .on('distancechange', this.onDistanceUpdate)