예제 #1
0
파일: MapFactory.cs 프로젝트: proxoft/Maps
        public async Task <IMap> Initialize(string elementId, MapOptions options)
        {
            var status = await _api.LoadGoogleScripts(_configuration);

            if (status != LoadResponse.Loaded)
            {
                return(NoMap.Instance);
            }

            var m   = await _moduleTask.Value;
            var map = GoogleMap.Create(elementId, options, m);

            return(map);
        }
예제 #2
0
파일: MapFactory.cs 프로젝트: proxoft/Maps
        public async Task <IMap> Initialize(MapOptions options, ElementReference hostElement)
        {
            var status = await _api.LoadGoogleScripts();

            if (status != LoadResponse.Loaded)
            {
                return(NoMap.Instance);
            }

            var mapId  = Guid.NewGuid().ToString();
            var module = await _moduleTask.Value;
            var map    = OsmMap.Create(mapId, options, hostElement, module);

            return(map);
        }