Long term Tile Caching

I have the need to cache tiles for a longer period (days or weeks) but I can't seem to find a workable solution to this. I don't see anything within the SFMaps API itself, and even when I try to proxy the calls via a URL like http://localhost:{_tileProxyService.Port}/tile/{{z}}/{{y}}/{{x}} it appears that all of the calls are forced into HTTPS, even after adding exceptions to the Info.plist (see below.) I'm trying to find the best path forward here but I've hit a wall. Looking for suggestions - thanks in advance.


	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSExceptionDomains</key>
		<dict>
			<key>localhost</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
		</dict>
	</dict>
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsLocalNetworking</key>
		<true/>
	</dict>

2 Replies

BS Brian Slezak April 9, 2026 12:02 AM UTC

I ended up finding a solution. I had to create a new class inheriting MapTileLayer, then override GetTileUrl:

    protected override string GetTileUrl(int x, int y, int z)
    {
        return UrlTemplate
            .Replace("{x}", x.ToString())
            .Replace("{y}", y.ToString())
            .Replace("{z}", z.ToString());
    }

The underlying problem is that the base method is in fact forcing https. In this case I was making a local call to localhost proxy, didn't need high security with this design, and really didn't want to deal with the complication of a certificate.



VM Vidyalakshmi Mani Syncfusion Team April 9, 2026 01:49 PM UTC

Hi Brian,


We’re glad to hear that your issue has been resolved. Please feel free to reach out if you need any further assistance. We’re always happy to help.


Regards,

Vidyalakshmi M.



Loader.
Up arrow icon