Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    31
    Vote Rating
    0
    clabasky is on a distinguished road

      0  

    Default map shows mountain view, ca before loading my info

    map shows mountain view, ca before loading my info


    hello Sencha friends!

    I have a map on my app that shows a route between two locations. The issue is that the map shows mountain view, ca for about a second before loading my custom map Any advice would be awesome~!!!

    Code:
     var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Loading..."});
    myMask.show();
                        postcard.setActiveItem(mappanel);
    		    
                  //grab location from record       
                           var getaddress = postdetailcard.data.address;
                           var getzipcode = postdetailcard.data.zipcode;
                           var getcity    = postdetailcard.data.city;
                               
                             
                  //geocode address            
                     var address = getaddress +', '+ getcity+', '+ getzipcode;             
                     var geocoder = new google.maps.Geocoder();
                    		 
    geocoder.geocode({'address': address}, function(results, status){
       if (status == google.maps.GeocoderStatus.OK) {
    
    
       		    var coord = results[0].geometry.location;	    
    		    var directionsDisplay;
    		    var directionsService = new google.maps.DirectionsService();
    		    var map;
    
    
        directionsDisplay = new google.maps.DirectionsRenderer();  
                                                        
      var lat = locationstore.data.items[0].data.latitude;
      var lng = locationstore.data.items[0].data.longitude;
      
      var start = lat+','+lng;
      var end = coord;
      
      var request = {
        origin:start,
        destination:end,
        travelMode: google.maps.TravelMode.DRIVING
      };
      
      directionsService.route(request, function(result, status) {
        if (status == google.maps.DirectionsStatus.OK) {
          directionsDisplay.setDirections(result);
          
           
        var image = 'logo-map-sm.png';
                  
    		  //show marker     
    			var marker = new google.maps.Marker({
    			   map: map,
    			    position: coord,
    			    icon: image
    			 });
    			
    			    var myOptions ={
    			  zoom: 14,
    			  center: coord,
    			  mapTypeId: google.maps.MapTypeId.ROADMAP      
    		       }
    	    
    			
    			   //creates map
        var map = new google.maps.Map(document.getElementById("detailmap"), myOptions);
      directionsDisplay.setMap(map);
        }
      });
     
    		      
           myMask.hide();                       				   		    
    		    }
    			  else {
    			       alert("Geocode fail" + status);
    			       myMask.hide();
    			    }
                     });

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    31
    Vote Rating
    0
    clabasky is on a distinguished road

      0  

    Default forgot to mention...

    forgot to mention...


    this is in my controller

  3. #3
    Sencha User
    Join Date
    May 2014
    Posts
    1
    Vote Rating
    0
    tim@locateaware.com is on a distinguished road

      0  

    Default


    I have the same problem and wondered if anyone has a workaround ? I'm using ST2.3 and in the maprender event I'm setting the map center to the current location, however when the view initially loads for a second or two the map is centered on Mountain View before the maprender event kicks in.

    I'd like it so that map initially renders with the correct position, but can't see to find a way. Any help appreciated.

    My maprender event:

    Code:
    var gmap = map.getMap();
    
    if(gmap !== null) {
       var center = new google.maps.LatLng(MyApp.app.currentLat, MyApp.app.currentLng);
        var marker = new google.maps.Marker({
            position: center,
            title: 'My Location',
            map: gmap
        });
        gmap.setCenter(center);
    
    }

Thread Participants: 1