How can I add here map as tile layer?

May 20, 2016 at 3:01 PM
I'd like to add Here maps map tiles to my map by BruTile / SharpMap.

The URL scheme is the following by their documentation: https://1.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/13/4400/2686/256/png8 ?app_id={YOUR_APP_ID} &app_code={YOUR_APP_CODE}

where 13 is zoomlevel, 4400 is column, 2686 is row.

Here is my code, but it times out, and map is empty. App id and app code are correct, it is 100% sure. What can be the problem?

var networkRes = Networking.HasInternetConnection();
                if (networkRes.Result == false)
                    throw new Exception(networkRes.InfoMessage);

                var uriString = "https://1.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/{z}/{x}/{y}/256/png8";

                var customParams = new Dictionary<string, string>();
                customParams.Add("app_id", "someappid");
                customParams.Add("app_code", "someappcode");

                var req = new TmsRequest(new Uri(uriString),"png" , customParams);

                var provider = new WebTileProvider(req);

                var tileSource = new TileSource(provider, new SphericalMercatorInvertedWorldSchema());

                TileLayer tileLayer;

                if (CacheWebMaps)
                {
                    var path = Path.Combine(MapCacheRoot, HEREBASELAYERNAME);
                    tileLayer = new TileLayer(tileSource, HEREBASELAYERNAME, new Color(), true, path);
                }
                else
                {
                    tileLayer = new TileLayer(tileSource, HEREBASELAYERNAME);
                }

                tileLayer.SRID = 3857;

                MapBox.Map.Layers.Add(tileLayer);
Coordinator
May 24, 2016 at 9:24 PM
This forum is not used anymore. Please post on github or on stackoverflow.

This question has been asked on stackoverflow last week. I assume by you :)
http://stackoverflow.com/questions/37348582/how-can-i-add-here-map-as-tile-layer-by-brutile-sharpmap/37353957#37353957