facebook

MapWidget DONT WORK

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 14 posts - 31 through 44 (of 44 total)
  • Author
    Posts
  • #347895 Reply

    PaulLeBlanc
    Participant

    Michael,
    Thankyou so very much. I was worried! Yes, please send me a dev build which I can use temporarily.
    Just for my curiousity, what was the problem?
    Thanks again.
    Paul

    #347910 Reply

    Unknown Author
    Participant

    Well…that was odd…

    I converted my app to iOS 7 look-and-feel tonight, recompiled, and the behavior stopped! Still using 2.6.1, but for whatever reason, the odd map behavior has gone away. Did you guys update the cloud service?

    -1TC

    #347917 Reply

    support-michael
    Keymaster

    @1thinchip
    > Did you guys update the cloud service?

    No public changes have been released for the map refresh issue. We will share a dev build as soon as it is ready.

    #347926 Reply

    Unknown Author
    Participant

    How odd. That behavior has stopped in my app.

    #347928 Reply

    PaulLeBlanc
    Participant

    @1thinchip,
    You are lucky, because I did a new compile on mine and no changes! Can’t wait for the change, Michael. Thanks again.

    #347942 Reply

    Hi guys,

    Please take a look at this 2.6.2 dev3 build available:
    http://www.genuitec.com/support-genuitec/viewtopic.php?f=2&t=7007

    Feedback is really appreciated.

    #347958 Reply

    PaulLeBlanc
    Participant

    @Michael,
    Definately getting closer!!! I could accept this fix … because at least it now refreshes the whole map. BUT, it still places the center of the map(my center is the center of the flight path) in the upper left corner the first time it displays – on the second leg. The first leg displays correctly. Let me explain: You should have all my code so have the dev team follow these instructions to get the error.

    ****** This occurs ONLY on the DEVICE! I used an iPad for testing. .. works fine in the sim.

    1. load program, hit <Start>, <QP Settings>, change aircraft … select <Falcon 7X>, hit <return>
    2. hit <Quick Planning>
    3. in dep date enter: 0311 , Dep time: 1000, departure: VNY, destination: CYQX, Hit <Calculate>, itinerary displays
    4. hit <MAP> … you will note map displays correctly, with the flight path centered ….hit <Back>, then <back>
    5. select leg: 2 in combo box.
    6. enter Dep time: 0900, destination: EINN, Hit <Calculate>, itinerary displays
    7. hit <MAP> … you will note map displays, BUT the flight path is not on the page. The center of the flight path is located in the top left corner. Note: you can slew it around, but just leave it alone for now.

    ** Now hit <Back>, then hit <MAP> again. Note, now the map is displayed correctly.

    leg 3 has the same problem as leg 2.

    Hope this helps.

    #347960 Reply

    Unknown Author
    Participant

    For some reason, my issue seems to have vanished.
    -1tc

    #348075 Reply

    PaulLeBlanc
    Participant

    Glad to hear that for you 1tc.

    Michael, Did you get my message that I still have a problem with the map not centering on first display. Refresh the map and it is ok.
    The dev guys are definately on the right path, because they fixed the map portion. Could you have them see if they can do something about the centering? Have them check using my program code and the sequence I set above.
    Thanks

    PS, if they consider this “fixed”, when is the new version of M1 due out?

    #348082 Reply

    support-michael
    Keymaster

    > Could you have them see if they can do something about the centering?

    Yes, continuing the investigation. Will update you as I learn more.

    #348148 Reply

    support-michael
    Keymaster

    Please try this following code rearrangement. With this code I am not able to replicate the map centering issue you describe on an iphone5. The routes I have been testing with in order to use different zoom levels are:
    leg1: dfw > lax
    leg2: lax > sfo
    leg3: sfo > jfk
    leg4: jfk > bos

    function removeFlightPath() {
        if (flightPath){
          flightPath.getPath().clear();
          //flightPath.setMap(null);
         }
    }
    
    function Show_GCMap() {
     $('[id$=map2]').gmapready(function(gmap) {
       removeFlightPath();
       MapZoom();
       
       var   mapcenter = new google.maps.LatLng(avglat[legg],avglon[legg]);
       var   start = new google.maps.LatLng(dep_lat_decimal[legg],dep_lon_decimal[legg]);
       var   end = new google.maps.LatLng(dest_lat_decimal[legg],dest_lon_decimal[legg]);
       var   arrow1 = [start,end];
          
       if (!flightPath) {
           flightPath = new google.maps.Polyline({
               map: gmap,
               path: arrow1,
               geodesic: true,
               strokeColor: "#FF0000",
               strokeOpacity: 0.6
              });
       } else {
           flightPath.getPath().push(start);
           flightPath.getPath().push(end);
       }
    
       gmap.setZoom(zoom);
       gmap.setCenter(mapcenter);
     });
    }
    #348154 Reply

    PaulLeBlanc
    Participant

    Michael,
    By the way I am testing on an iPad2, vers 6.1 IOS

    I tried your code and for the last 2 hrs tried variations of same. I still get the same “centering” problem.

    As a work around I have added a button<CenterMap> to the bottom of page <QP_3_Results.mobi>. All it does is call ” Show_GCMap(); “.

    Leg#1: VNY – CYQX >>>>> displays OK
    Leg#2: CYQX – EINN >>>>> centering problem

    Then I hit the <CenterMap> button and the map centers and displays OK! I have not changed anything, just called Show_GCMap() again!!!

    ******
    As a test I took the the mapcenter function out of the code:

    // gmap.setCenter(mapcenter);

    Now the map displays centered on the default position <34,-150> that is set in the properties of the map2 (this is what it should do). Upon displaying leg#2 it centers somewhere up near Alaska.

    So somehow the center variable is getting lost when the map is displayed the second time.

    Hope this helps. Sorry for being such a problem to you.

    Paul

    #348156 Reply

    support-michael
    Keymaster

    I just tested my version on ipad air/ios7.1. Centers properly.
    Our ipad2/ios6 died; can’t verify there.

    >As a work around I have added a button

    I did something similar. I pan map then hit center button. It returns to center pt with no issue.

    As an experiment you might put the setCenter() call in a setTimeout() with 500ms delay to see if there is some contention between zoom and centering functions.

    #348165 Reply

    PaulLeBlanc
    Participant

    Michael,
    I tried the “timeout” and no changes.

    Can you please try one more thing then we’ll just have to let it go.

    Take out the mapcenter function out of the code: The center of the map should be ALWAYS now at the default location Lat, Lon set in the map2 preferences, <34,-150>.

    // gmap.setCenter(mapcenter);

    Now make the first leg VNY – CYQX. The map should display centered on the default “location”/ position of <34,-150> that is set in the location properties of the map2 (this is what it should do).
    —- Do not touch the <Center Map Button> ——-
    Now make the second leg CYQX – EINN. The map SHOULD again and ALWAYS center at the default position, but it does not. It centers somewhere up west of Alaska.

    Third leg is further off!!!

    If you get this same error – with the center moving – , then somehow the “center” variable is getting lost when the map is displayed the second time. THIS might be the problem and where the dev guys should look.

    Thanks so much,

Viewing 14 posts - 31 through 44 (of 44 total)
Reply To: MapWidget DONT WORK

You must be logged in to post in the forum log in