Mapkit problem

Hi, i’m using the mapkit example and I cannot get it working to use both the map and a layer above that. In 007 it only shows the above layer and in 071 I only see the map.

In 071
mapKit.close() doesn’t work
No other gl information can be added as an extra layer
after mapKit.open(), mapkit.close() doesn’t work
Updating the positions of the line isn’t correct.

I think this is the problem:

  
[ofxiPhoneGetUIWindow() addSubview:mapView];  

Here’s a screenshot with a modified CGRectMake in the library:

Fixed it by changing this:

  
  
void ofxiPhoneSendGLViewSwitch() {  
  
      
    [ofxiPhoneGetUIWindow() bringSubviewToFront:iPhoneGetGLView()];  
    [iPhoneGetGLView() setNeedsDisplay];  
    [iPhoneGetGLView()removeFromSuperview];  
      
    [ofxiPhoneGetUIWindow() bringSubviewToFront:iPhoneGetGLView()];  
    [iPhoneGetGLView() setNeedsDisplay];  
    [ofxiPhoneGetUIWindow() addSubview:iPhoneGetGLView()];  
      
}  
  
  

and adding this to draw():

  
  
   ofBackground(0,0);  
  

Now I have another question, what is an the sollution to get the touch events thru the different layers? And that the updating of the draw is directly?

I’ve found this:

http://forum.openframeworks.cc/t/fix-for-uiscrollview-pauses-openglupdate/5786/0

But I don’t know how to insert this? Could somebody give me some hints?

For the people who are interested. The bug is fixed : https://github.com/openframeworks/openFrameworks/issues/1345#issuecomment-6520300

Made a workaround for the UIscrollview problem by using setRegionWithMeters and ofxPanZoom:

  
  
void testApp::touchDown(ofTouchEventArgs & touch){  
    cam.touchDown(touch); //fw event to cam  
    startX = cam.offset.x;  
    startY = cam.offset.y;  
  
}  
  
  
  
  
  
//--------------------------------------------------------------  
void testApp::touchMoved(ofTouchEventArgs & touch){  
      
    	cam.touchMoved(touch);   
     
    if ( touch.numTouches == 1 ){   
        movedY = cam.offset.x- startX;  
        movedX = cam.offset.y- startY;  
          
        float mappedZoom =   ofMap(cam.zoom, 0, 100, 0, 1300);  
         mapKit.setRegionWithMeters(mapKit.getCenterLocation().latitude+((movedX/(100000*2.4)*mappedZoom)), mapKit.getCenterLocation().longitude-((movedY/(100000*2.4)*mappedZoom)), vertX, vertY);;  
          
      
    } else if ( touch.numTouches == 2 ) {  
        if (touch.id == 1){  
            vertX =  cam.zoom *1000;  
            vertY = cam.zoom *1000;  
            mapKit.setRegionWithMeters(mapKit.getCenterLocation().latitude, mapKit.getCenterLocation().longitude, vertX, vertY);  
              
                        
        }  
    }  
     
}