TMS iCL DEVELOPERS GUIDE - TMS Software
TMS iCL DEVELOPERS GUIDE - TMS Software
TMS iCL DEVELOPERS GUIDE - TMS Software
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>TMS</strong> SOFTWARE<br />
<strong>TMS</strong> <strong>iCL</strong><br />
<strong>DEVELOPERS</strong> <strong>GUIDE</strong><br />
<strong>TMS</strong>FMXNativeMKMapView1.BeginUpdate;<br />
tl := MakeMapLocation(34.4311, -118.6012);<br />
tr := MakeMapLocation(34.4311, -118.5912);<br />
bl := MakeMapLocation(34.4194, -118.6012);<br />
br := MakeMapLocation(34.4194, -118.5912);<br />
mr := MakeMapLocation(34.4248, -118.5971);<br />
splat := Abs(br.Latitude - tl.Latitude);<br />
splon := Abs(br.Longitude - tl.Longitude);<br />
rgn.Center.Latitude := mr.Latitude;<br />
rgn.Center.Longitude := mr.Longitude;<br />
rgn.Span.latitudeDelta := splat;<br />
rgn.Span.longitudeDelta := splon;<br />
<strong>TMS</strong>FMXNativeMKMapView1.SetRegion(rgn, True);<br />
<strong>TMS</strong>FMXNativeMKMapView1.AddImage(ExtractFilePath(ParamStr(0)) +<br />
'overlay_park.png', tl, br);<br />
<strong>TMS</strong>FMXNativeMKMapView1.MapType := mtMapTypeHybrid;<br />
<strong>TMS</strong>FMXNativeMKMapView1.EndUpdate;<br />
The result of the code is shown in the screen below, with and without the image to demonstrate the<br />
difference. Comment out the line <strong>TMS</strong>FMXNativeMKMapView1.MapType := mtMapTypeHybrid;<br />
to have a better view of the added image.<br />
76