I started out with a TForm3D (so the Firemonkey 3D form) and added a TPlane to it. The plane has it’s RotationAngle.X set to 315 (which is -45 degrees) to get the tilt. I added a TTextureMaterialSource component and linked it to the TPlane before assigning a default image to it. I also added a TFloatAnimation to the TPlane, set it to change PropertyName RotationAngle.Z, Duration 10, StartFromCurrent, and StopValue 359. The FloatAnimation causes the plane object to rotate.
Next I added a TCone in the center of the screen, tilted it -45 degrees to match the TPlane, gave it a LightMaterialSource, and placed a TLight above the cone to give it some shading. I then added a TLayer3D into the scene and set it’s Projection to pjScreen and set it’s Align property to alContents. I placed a TLabel inside of the TLayer3D and set it’s Align to alMostBottom. you can use the TLayer3D to add whatever other interface controls you want on to this project.
I have also added a TIdHTTP component and linked in a TIdCompressionIntercept, TIdCompressorZLib, TIdCookieManager, and TIdSSLIOHandlerSocketOpenSSL (none of these besides TIdHTTP are necessary). I setup a function called LoadMapImage() which uses TIdHTTP in an anonymous thread to download a map from Google Maps static image service. You should get a Google Maps static API key to use the static service more than a few times.
Next up I added a TLocationSensor and a couple timers. Your GPS needs to be enabled on your mobile device for the location sensor to work. The first timer delays the start of the location sensor and the second timer only allows the location sensor to update the map every 5 seconds. At start up it loads a high zoom map of the United States as it waits for the location sensor to kick in and as a placeholder on Windows which has no location sensor. The map that gets loaded is passed through SaveBitmapWithEffect function which applies a TInvertEffect to the bitmap before assigning it to the TPlane texture.
That is pretty much all there is to it. It needs polish and you can continue to enhance it and use it for your own purposes.
Download the full project with source code for Delphi XE5 Firemonkey Alternate Reality Map 3D.
Not work move the form on second monitor on OSX.
My Delphi Xe10.1 is not worked.
FMX.Sensors not found in Library.
How to fix it?