Пример #1
0
 public MsieaTileProvider(MapDetailsDto mapDetailsDto)
 {
     TileWidth    = TileHeight = 256;
     XCount       = mapDetailsDto.TilesXcount;
     YCount       = mapDetailsDto.TilesYcount;
     _uriTemplate = mapDetailsDto.TilesDir.Replace("x-y", "{0}-{1}");
 }
        private Map GetMapFromMapDetailsDto(MapDetailsDto mapDetailsDto)
        {
            var beaconNodes  = mapDetailsDto.Beacons.Select(GetNodeFromBeaconDto);
            var navHintNodes = mapDetailsDto.Nodes.Select(GetNodeFromNodeDto);

            return(new Map(
                       id: mapDetailsDto.MapId,
                       title: mapDetailsDto.MapLevel,
                       size: new SizeU(mapDetailsDto.MapSizeX, mapDetailsDto.MapSizeY),
                       nodes: beaconNodes.Concat(navHintNodes).ToArray(),
                       lowResolutionMapUri: new Uri(mapDetailsDto.Directory),
                       tileProvider: new MsieaTileProvider(mapDetailsDto)));
        }