Flyover mode in MapKit with WMS

Suprise, iOS 9 MapKit finally enables  flyeover mode with WMS overlays ! I have used my github  MapKit sample and only  set in MapViewController    mkMapView.mapType = MKMapTypeHybridFlyover;

Advertisements

Links for iOS dev. fonts etc.

Fonts for iOS:

https://github.com/mediacabinet/fawe-ios
https://github.com/nschum/FontAwesomeIconFactory
https://github.com/waterlou/WTGlyphFontSet

Commnad Master:
https://github.com/asm09fsu/CommandMaster

Obj-C (ARC) in depth :
http://adcdownload.apple.com//wwdc_2011/adc_on_itunes__wwdc11_sessions__pdf/322_objectivec_advancements_in_depth.pdf

Safari on iOS& and HTML changes
http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review

Menu on iOS with MJPopupViewController

IMG_2646

Searched a lot, didn’t want to program something that had to be part of the iOS, found lot of over-bloated components and found it finally here,  tiny (2 classes) , well written, easy to understand the code, fun concept (big button as background view to receive taps outside the control) :

Here is a snapshot of my testing code with UITableViewController using this lib, note transparency and special font used for menu:

https://github.com/martinjuhasz/MJPopupViewController

 

 

Screen Shot 2013-10-11 at 9.03.12 AM

Mapy CUZK mobile app available

pikto_100“Mapy CUZK” has been just released on both Android and iOS platforms by “CUZK”( “Czech Office For Surveying, Mapping and Cadastre”). The app enables to see various map compositions from OGC services, perform query and search in the map. it is based the  same engine that powers iKatastr2, enables flexible extensions and uses modern myVR rendering engine.

Apple App Store : https://itunes.apple.com/us/app/mapy-cuzk/id634374870?mt=8

Google Play :  https://play.google.com/store/apps/details?id=com.intergraph.cadaster

How to disable base Google Maps in MapKit

Sept 26th 2012 update :for erasing iOS6 base maps look here: https://blog.sumbera.com/2012/09/26/how-to-erase-ios6-maps-in-mapkit/ 

I have searched this and couldn’t find any answer, so here is my own research so far on this subject. You can disable MapKit base layers using 3 approaches:

#1 remove subview from MKMapView (quite bad as you will loose all overlays too)

#2 use undocumented function (bad too as this will be rejected by Apple approval process):

// get MKMapTileView from view hierarchy
UIView * mkMapTileView = [((UIView*) [ ((UIView*)[self.subviews objectAtIndex:0]).
subviews objectAtIndex:0]).subviews objectAtIndex:0];
// call undocumented method
if ( [mkMapTileView respondsToSelector:@selector(setDrawingEnabled:)]){
[mkMapTileView performSelector:@selector(setDrawingEnabled:) withObject:(id) NO];

#3 use method swizzle

inspired by http://www.mikeash.com/pyblog/friday-qa-2010-01-29-method-replacement-for-fun-and-profit.html

http://atastypixel.com/blog/making-uitoolbar-and-uinavigationbars-background-totally-transparent/

this method is fine as it is official method and enables you to ‘subclass’ a class that you don’t have access in compile time.

#import <objc/runtime.h>

// original method declaration
static void (*_origDrawLayerInContext)(id, SEL, CALayer*, CGContextRef);
// set up subclass in runtime..in some entering method
UIView * mkMapTileView = [((UIView*) [ ((UIView*)[self.subviews objectAtIndex:0]). subviews objectAtIndex:0]).subviews objectAtIndex:0];

Method  origMethod = class_getInstanceMethod([mkMapTileView class], @selector(drawLayer:inContext:));

_origDrawLayerInContext = (void *)method_getImplementation(origMethod);

if(!class_addMethod([mkMapTileView class], @selector(drawLayer:inContext:), (IMP)OverrideDrawLayerInContext, method_getTypeEncoding(origMethod)))

method_setImplementation(origMethod, (IMP)OverrideDrawLayerInContext);

// implement our Override
static void OverrideDrawLayerInContext(UIView *self, SEL _cmd, CALayer *layer, CGContextRef context) {
// possibly call original method if you leave it empty base google maps will not be displayed. You can draw custom content here as well...
//  _origDrawLayerInContext(self, _cmd, layer, context);

}