How can I add here map as tile layer?

May 20, 2016 at 2: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: ?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 = "{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);
                    tileLayer = new TileLayer(tileSource, HEREBASELAYERNAME);

                tileLayer.SRID = 3857;

May 24, 2016 at 8: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 :)