Closed chapayGhub closed 1 year ago
Google maps sample:
iosched-ios/Source/IOsched/Screens/Map/MapViewController.swift https://github.com/google/iosched-ios/blob/adb2cef4455b7990d0648d0e26eefe8ffc6bd92f/Source/IOsched/Screens/Map/MapViewController.swift
overlay.map = mapView return mapView } private func setupOverlay() -> GMSOverlay { let mapImage = UIImage(named: "map.png") let overlayBounds = GMSCoordinateBounds(coordinate: Constants.overlaySouthWest, coordinate: Constants.overlayNorthEast) let overlay = GMSGroundOverlay(bounds: overlayBounds, icon: mapImage) overlay.bearing = 0 return overlay }
Apple MapKit:
https://www.raywenderlich.com/2765-overlay-images-and-overlay-views-with-mapkit-tutorial
Sample screen: https://koenig-media.raywenderlich.com/uploads/2014/06/MapOverlay.png
https://github.com/josephBustamante/Independent-Study-Tutorials/blob/e1d58cf987897d7aa20895e08f5e3c8dbcc2cfa1/Park%20View/PVParkMapViewController.m
https://github.com/josephBustamante/Independent-Study-Tutorials/blob/master/Park%20View/PVParkMapOverlayView.m
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay { if ([overlay isKindOfClass:PVParkMapOverlay.class]) { UIImage *magicMountainImage = [UIImage imageNamed:@"overlay_park"]; PVParkMapOverlayView *overlayView = [[PVParkMapOverlayView alloc] initWithOverlay:overlay overlayImage:magicMountainImage]; return overlayView; }
Thanks
Hi @chapayGhub, have the same problem. Also haven't found info how to do that with Yandex maps. Will be great if someone can explain how to do that with YandexMaps
At this time it not supported.
Google maps sample:
iosched-ios/Source/IOsched/Screens/Map/MapViewController.swift https://github.com/google/iosched-ios/blob/adb2cef4455b7990d0648d0e26eefe8ffc6bd92f/Source/IOsched/Screens/Map/MapViewController.swift
Apple MapKit:
https://www.raywenderlich.com/2765-overlay-images-and-overlay-views-with-mapkit-tutorial
Sample screen: https://koenig-media.raywenderlich.com/uploads/2014/06/MapOverlay.png
https://github.com/josephBustamante/Independent-Study-Tutorials/blob/e1d58cf987897d7aa20895e08f5e3c8dbcc2cfa1/Park%20View/PVParkMapViewController.m
https://github.com/josephBustamante/Independent-Study-Tutorials/blob/master/Park%20View/PVParkMapOverlayView.m
Thanks