Category Archives: MapKit

MapKit on iOS things

HxGN13: SG&I Perspectives LIVE

Here is a project I have been working on iKatastr2 (SpatialReader) with myVR technology showing terrain model with overlays of OGC WMS services. All from freely available data. Presented at HxGN live 2013

https://www.youtube.com/watch?v=oVRYfK6jyoY&t=39m10s

at 39:10 watch myVR multiplatform rendering technology integrated in the mobile app for 3D map visualisation.

Here are also few pictures form HxGN live booth/keynote

How to erase iOS6 maps in MapKit

Update: be aware as this is not working on iOS7, however in iOS7 MapKit officially supports to disable base layer !

This blog : http://blog.sumbera.com/2011/09/18/how-to-disable-base-google-maps-in-mapkit/ wrote about how to disable Google maps in MapKit. Now with new iOS6 and brand new Apple maps and OpenGL rendering , the question is how to disable rendering of the base maps without using undocumented functions. Removing whole base layer (VKMapView) is possible but cripples touch handling of the overlays. So here is very simple way how to do this without removing VKMapView – just set opacity of the layer to 0.0. This will erase base iOS6 maps .

+(void) eraseiOS6maps:(UIView*) mapView{
   // -- get rendering layer
    UIView *rootView = [mapView.subviews objectAtIndex:0];
    UIView *vkmapView = [rootView.subviews objectAtIndex:0];
    UIView *vkmapCanvas = [vkmapView.subviews objectAtIndex:0];
   // -- set opacity to 0.0 
    [vkmapCanvas.layer setOpacity:0.0];
}

View hierarchy:

MkMapView/UIView/VKMapView/VKMapCanvas
MkMapView/UIView/MkScrollContainerView/MkOverlayContainerView/MkOverlayClusterView/<your overlay>
MkMapView/UIView/MkAnnotation/...
MkMapView/MkAttributionLabel

ESA App challenge winner

  I have participated in the first ESA (European Space Agency)  app dev challenge where 5 teams competed on best  concept/prototype that will bring GMES data sources to the public on mobile devices. Our team (Czech Republic, Germany, Macedonia) won and each member got iPad 3 . We won not because we were best in terms of  the best prototype,  concept or presentation, but because we fit best to the criteria imposed by this challenge and each piece of delivery (5 page long document describing concept, presentation, prototype demo)  was pretty good and simple enough to be feasible for final realization. Moreover a unique value of mobile devices plus unique value of  GMES satellites have been addressed.  Full article can be read here :   http://www.esa.int/esaEO/SEMIQOBXH3H_index_0.html

Update 08/08/2012 : there is also press release from my company  Intergraph : http://www.intergraph.com/assets/pressreleases/2012/08-01-2012.aspx

 

Relation between MKMapRect and Spherical Mercator Resolution

MKMapRect projected coordinate system used in iOS MapKit  is not the same as Spherical Mercator used by Google, Bing and others. However there is a close linear relationship of the resolution in official spherical mercator and scale used by MapKit and that is   0.149291.

this number is constant for this relation :spherical mercator resolution (e.g. used by OpenLayers)  * zoomscale (used in MapKit)

spherical mercator resolution calculated as : spherical mercator width / view width

zoomscale in MapKit is calculated as : view width / mkMapRect.size.width

that is : spherical mercator width / mkMapRect.size.width = 0.149291  always.

So now any resolution from Spherical Mercator can be directly mapped into the MapKit internal coordinate system (mkMapRect) and vice versa without heavy calculations from mkMapRect to WGS84 and then to Spherical Mercator.

more about projection used in MapKit can be found here : LocationAwarenessPG