Menu

Babak, can you add MKTileOverlay and MKTileOverlayRenderer Class to MapKit?

Bryan
2014-05-21
2014-05-25
  • Bryan

    Bryan - 2014-05-21

    Hello Babak,
    I would like to add an image overlay to the MapView. From what I've read on the Apple Dev site, this is done by the MKTileOverlay Class in the MapKit Framework.

    What I'm trying to do is overlay an image on the map that will scale with the map. Similar to Google's Ground Image overlay where the image is correctly mapped to the background map.

    I'm willing to pay to have this done if anyone is willing.

    I really hope this is possible.
    Regards,
    Bryan

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-05-21

    Hi Bryan

    Do you want only draw image as overlay on mapview or you want to draw your custom map tiles ?

    can you attach a sample screenshot of what you want, please ?

    Regards

     
  • Bryan

    Bryan - 2014-05-21

    Hello Babak,
    At this time, I do not need custom map tiles, just a raster image overlay.
    I've attached a sample screen shot of how it would look. This screen shot is close to what I want, but the image overlay will be of weather radar.
    Like from this URL:
    http://radar.weather.gov/ridge/Conus/RadarImg/southplains_radaronly.gif
    It is a weather radar image of the south central U.S.

    In the future the full map tile support would be nice because there are many providers of map tiles for weather or other geographic related items.

    Thanks for looking into this.

    Regards,
    Bryan

     

    Last edit: Bryan 2014-05-21
  • Bryan

    Bryan - 2014-05-21

    There is an associated reference file with the image file posted above.
    The reference file is located here:
    http://radar.weather.gov/ridge/Conus/RadarImg/southplains_radaronly.gfw

    The details of the reference file are:
    Line 1: x-dimension of a pixel in map units
    Line 2: rotation parameter
    Line 3: rotation parameter
    Line 4: NEGATIVE of y-dimension of a pixel in map units
    Line 5: x-coordinate of center of upper left pixel
    Line 6: y-coordinate of center of upper left pixel

    Regards,
    Bryan

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-05-22

    Hi Bryan

    Download Last source code and see MapViewTileOverlay Demo.
    Let me know if you want anything else.

    Regards

     
  • Bryan

    Bryan - 2014-05-23

    Hello Babak,
    I see you added TileOverlayType with Google and OpenStreets, but I'm not sure how this solves my problem. I need to add a single overlay image on the map as described above.

    I need some way to overlay this image:
    http://radar.weather.gov/ridge/Conus/RadarImg/southplains.gif

    I hope this is possible.
    Regards,
    Bryan

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-05-23

    Hi Bryan

    Do you see the MapViewTileOverlay demo ?
    In this demo added a single image on the map.
    Please see this demo and let me know about it.

    Regards

     
  • Bryan

    Bryan - 2014-05-23

    Babak,
    I must be missing something.
    The demo does not have any code in it. (vers 8.9.1)
    I do see a clouds.jpg image file in the folder.
    Also, when I launch the project in debug mode or non debug mode it fails to launch. My other project using the mapView does launch and work even with google set as the overlay type. Using XE6.

    All I see in the uMain.pas file is the below code.

    unit uMain;

    interface

    uses
    System.SysUtils, System.Types, System.UITypes, System.Classes,
    System.Variants,
    FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, DPF.iOS.MapKit,
    DPF.iOS.BaseControl, DPF.iOS.MKMapView, DPF.iOS.UIButton,
    DPF.iOS.UIView,
    DPF.iOS.Common,
    DPF.iOS.UILabel, DPF.iOS.UITextField;

    type
    TFMapViewTileOverlay = class( TForm )
    DPFMapView1: TDPFMapView;

    private
    { Private declarations }

    protected
    procedure PaintRects( const UpdateRects: array of TRectF ); override;
    public
    { Public declarations }
    end;

    var
    FMapViewTileOverlay: TFMapViewTileOverlay;

    implementation

    {$R *.fmx}

    procedure TFMapViewTileOverlay.PaintRects( const UpdateRects: array of TRectF );
    begin
    { }
    end;

    end.

     

    Last edit: Bryan 2014-05-23
  • Bryan

    Bryan - 2014-05-23

    Babak,
    I forgot to mention the version i'm using 8.9.1 and I'm using XE 6
    Regards,
    Bryan

     
  • Bryan

    Bryan - 2014-05-23

    Hello Babak,
    I'm sorry, but there is no change in that link also.
    The uMain.pas file is the same. No other code.
    I am looking at the MapViewTileOverlay demo folder.
    Can you paste the code from the uMain.pas in this discussion thread?

    Regards,
    Bryan

     
  • Bryan

    Bryan - 2014-05-23

    I clear my browser cache and files downloaded and downloaded again, but still the same. No additional code in uMain.pas.

    Bryan

     
  • Bryan

    Bryan - 2014-05-25

    Has anyone else downloaded the latest source and seen the code(MapViewTileOverlay demo folder)? It still shows an empty uMain.pas (other than the standard shell of the unit).

    Thanks!
    Bryan

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.