Google Maps API - Route location apparently incorrect?

Are you thinking about building your own route? or are you already in progress? Talk to the experts in here and find out the best way to do things!

Moderator: Moderators

Locked
Tom5305
Been on the forums for a while
Posts: 241
Joined: Mon Sep 17, 2012 7:21 am

Google Maps API - Route location apparently incorrect?

Post by Tom5305 »

Can anyone with a copy of CR's original ECML modern and Google Maps API tell me if they find the route is way off its co-ordinates please?
Was hoping to add the line from Doncaster to Goole and maybe beyond but the map is not corresponding with the route. I have inserted the
lat & long for Doncaster station into the compass on the TS world editor and Google maps shows the aerial view of Doncaster but sat over
the Newark station location! If I go to Doncaster station location in world editor Google maps shows roads and fields which I cannot identify
as even being part of South Yorkshire!
Any suggestions would be much appreciated.
Thanks
Tom
Doncaster
SkylineBoy
Well Established Forum Member
Posts: 825
Joined: Mon Jun 29, 2015 1:26 pm
Location: Crimdon

Re: Google Maps API - Route location apparently incorrect?

Post by SkylineBoy »

Just checked and it's pretty much bang on in terms of the correct location. Is this a clone of the route ?
Tom5305
Been on the forums for a while
Posts: 241
Joined: Mon Sep 17, 2012 7:21 am

Re: Google Maps API - Route location apparently incorrect?

Post by Tom5305 »

SkylineBoy wrote:Just checked and it's pretty much bang on in terms of the correct location. Is this a clone of the route ?
Yes I cloned it but wondered if that was the problem? Have checked original route and yes that shows it as you say!
Does this mean that a clone copy is not workable would you know?
Thansk
Tom
brysonman46
Very Active Forum Member
Posts: 2047
Joined: Sun Jul 21, 2013 10:30 am
Location: Larbert Central Scotland

Re: Google Maps API - Route location apparently incorrect?

Post by brysonman46 »

Tom5305 wrote:
SkylineBoy wrote:Just checked and it's pretty much bang on in terms of the correct location. Is this a clone of the route ?
Yes I cloned it but wondered if that was the problem? Have checked original route and yes that shows it as you say!
Does this mean that a clone copy is not workable would you know?
Thansk
Tom
Cloning from in Game quite often changes the route origin in RouteProperties.xml. To correct this you have 2 options:
1. Use the original version, then edit the Route GUID in the lines
<DevString d:type="cDeltaString">5594cc47-57f5-4237-a0a1-7a003e6a693c</DevString>
putting the new set of numbers in place of the original

2. Copy the route origin from the original to the clone, using the lines
<Origin>
<sGeoPosition>
<Lat d:type="sFloat64" d:alt_encoding="32772D211FB44A40" d:precision="string">53.4072</Lat>
<Long d:type="sFloat64" d:alt_encoding="6F47382D78D107C0" d:precision="string">-2.97728</Long>
</sGeoPosition>
</Origin>
<MapOffset>
<sMapCoords>
<Easting d:type="sFloat64" d:alt_encoding="EC51B81E859A9740" d:precision="string">1510.63</Easting>
<Northing d:type="sFloat64" d:alt_encoding="00000080E0925641" d:precision="string">5.91757e+006</Northing>
</sMapCoords>
</MapOffset>

Note that the numbers shown are from another route! Method 1 is easier and quicker

The secret is, however, to clone using RWTools

Nick
Tom5305
Been on the forums for a while
Posts: 241
Joined: Mon Sep 17, 2012 7:21 am

Re: Google Maps API - Route location apparently incorrect?

Post by Tom5305 »

Thanks Nick - don't know why I didn't think of RW Tools! Will have a dabble tomorrow and see how it goes.
Tom
Locked

Return to “[TS] Route Building”