Jump to content
Sign in to follow this  
Ty53650

FS Earth Tiles Config Help

Recommended Posts

I've been having a hard time getting my Ini file configured to use the various map services, I understand you are no longer able to use google, but are there any others? I can't seem to figure out how to do it? I've looked at some pre-made Tileproxy configs but don't know how to convert those to work with FS Earth tiles.. I'd love to start making the state of montana, but am stuck at the moment. Any help would be greatly GREATLY appreciated! If someones using FS earth tiles and could point me in the right direction please reply or shoot me a PM! Thanks!Ty

Share this post


Link to post
Share on other sites

Here's my services in FSEarthTiles.ini:

[Service1]ServiceCodeing = xyinvzServiceUrl	   = http://khm1.google.com/kh?v=64%s#Referer = http://khm0.google.com#UserAgent = Mozilla/4.0ServerVariations = khm0,khm1,khm2,khm3[Service2]ServiceCodeing   = 0123ServiceUrl	=	http://ecn.t1.tiles.virtualearth.net/tiles/a%s.jpeg?g=488&mkt=en-us&n=z#Referer		 = http://a1.ortho.tiles.virtualearth.net						#optional (older versions g=104, g=52)#UserAgent	   = Mozilla/4.0												   #optionalServerVariations = ecn.t0,ecn.t1,ecn.t2,ecn.t3[Service3]ServiceCodeing = xyzServiceUrl	 = http://maps3.yimg.com/ae/ximg?v=1.9&t=a&s=256&.intl=en&%s#Referer	   = http://us.maps3.yimg.com/											   # (old versions v=1.7, v=1.5)#UserAgent	 = Mozilla/4.0

Also in FSEarthTiles.ini, you need to enable CSharpScripts:

#--- Yes/No Switches --UseCSharpScripts			= Yes

Then TileCodeingScript.cs must be altered to allow the newer Google coding:

using System;using System.Collections.Generic;using System.Text;using FSEarthTilesInternalDLL;namespace FSEarthTilesDLL{	public class TileCodeingScript	{		//The following Methodes will be called by FSEarthTiles:		//MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)		public String MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)		{			String vResultCode = "";			if (EarthCommon.StringCompare(iUseCode, "xyz"))	  // example Service 3 thank's to Steffen I.			{				// Some Services uses same Lvl system as FSEarthTiles(funny coincidence) Service Lvl z=1 is 1 m/pixel				Int64 vServiceZ = iAreaCodeLevel;				Int64 vServiceX = iAreaCodeX;				Int64 vServiceY;				if (iAreaCodeLevel < EarthMath.cLevel0CodeDeep)				{					Int32 vYConvertPower = (Int32)(EarthMath.cLevel0CodeDeep - iAreaCodeLevel - 1); //-1 because Service uses positive and negative numbers for Y					vServiceY = (1 << vYConvertPower) - 1 - iAreaCodeY;  // 1<<vYConvertPower (is equal to 2^vYConvertPower)				}				else				{					//lvl 18, whole world is not covered correct, you can only get the upper (y=0)or lower (y=-1) world half instead the whole.					//so make that tile unavailable					vServiceX = 0;					vServiceY = 0;					vServiceZ = 100;				}				vResultCode = "x=" + vServiceX + "&y=" + vServiceY + "&z=" + vServiceZ;			}			else if (EarthCommon.StringCompare(iUseCode, "xyinvz"))			{				Int64 vServiceZ = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;				Int64 vServiceX = iAreaCodeX;				Int64 vServiceY = iAreaCodeY;				vResultCode = "&x=" + vServiceX.ToString() + "&y=" + vServiceY.ToString() + "&z=" + vServiceZ.ToString();			}			   			else   // Quad mode,  examples Services 1 and 2			{				Int64 vSteps = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;				Int64 vXStart = 0;				Int64 vXStop = EarthMath.GetAreaCodeSize(iAreaCodeLevel) - 1;				Int64 vYStart = 0;				Int64 vYStop = EarthMath.GetAreaCodeSize(iAreaCodeLevel) - 1;				Int64 vXHalf;				Int64 vYHalf;				Char vC0;				Char vC1;				Char vC2;				Char vC3;				vC0 = iUseCode[0];				vC1 = iUseCode[1];				vC2 = iUseCode[2];				vC3 = iUseCode[3];				for (Int64 vCon = 1; vCon <= vSteps; vCon++)				{					vXHalf = (vXStart + vXStop + 1) >> 1;					vYHalf = (vYStart + vYStop + 1) >> 1;					if (iAreaCodeY < vYHalf)					{						if (iAreaCodeX < vXHalf)						{							vResultCode += vC0;							vYStop = vYHalf;							vXStop = vXHalf;						}						else						{							vResultCode += vC1;							vYStop = vYHalf;							vXStart = vXHalf;						}					}					else					{						if (iAreaCodeX < vXHalf)						{							vResultCode += vC2;							vYStart = vYHalf;							vXStop = vXHalf;						}						else						{							vResultCode += vC3;							vYStart = vYHalf;							vXStart = vXHalf;						}					}				}			}			return vResultCode;		}	}}

I need to use the "www" blue button. HB=100, the author of the program also confirms the need to use the blue "www" button. The upside of the button is that it starts a web browser, and that allows you to answer any Captchas that arise.Dick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...