Tuesday, June 28, 2016

Interactive KML Placemarks using HTML/JavaScript

Be The First To Comment
My colleague stopped by this morning and asked me to see if there is any way to  implement combo box / drop-down list in KML file for dynamically selecting the Placemarks' information. Few hour of googling come up with a quick and dirty KML (adding custom data) using HTML/JavaScript in <ExtendedData> tag with combo box selection and pasted it here for our future reference. It may helps others as well. If there are any alternatives feel free to chime in.

 <?xml version="1.0" encoding="UTF-8"?>  
 <kml xmlns="http://www.opengis.net/kml/2.2">  
      <Document>  
         
      <Style id="MyBalloonStyle">  
           <BalloonStyle>  
                <text> <![CDATA[  
                <b>Example extended data template</b>  
   
                <div style="width:350px;" id="tree"></div>  
   
                <table id="table" border="1" >  
                     <tr><td>Company Name</td></tr>  
                     <tr><td><i>$[Company_Name]</i></td></tr>  
                     <tr><td>  
                          <select id = "treeListSelection" onchange = 'treeListChanged(value)'>  
                           <option>--Select--</option>  
                           <option value="tree 1">'Tree 1'</option>  
                           <option value="tree 2">'Tree 2'</option>   
                          </select>  
                     </td></tr>  
                </table>    
   
                <script type="text/javascript">   
                 function treeListChanged(value){  
                     document.getElementById('tree').innerHTML = value ;        
                 }  
                </script>  
   
                ]]></text>  
                <bgColor>ffffffbb</bgColor>  
           </BalloonStyle>  
           <IconStyle> <color>ffffffff</color> <scale>1</scale>  
                <Icon><href>http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png</href>  
                </Icon>  
           </IconStyle>  
           <LabelStyle>   
                <scale>0</scale>   
           </LabelStyle>  
      </Style>  

Monday, June 27, 2016

[SOLUTION] Vagrant - Remote connection disconnect. Retrying ...

Be The First To Comment
Here is error from guest machine, complaining about remote connection

 ==> default: Attempting graceful shutdown of VM...  
 ==> default: Clearing any previously set forwarded ports...  
 ==> default: Clearing any previously set network interfaces...  
 ==> default: Preparing network interfaces based on configuration...  
   default: Adapter 1: nat  
   default: Adapter 2: hostonly  
 ==> default: Forwarding ports...  
   default: 80 (guest) => 8080 (host) (adapter 1)  
   default: 3000 (guest) => 3000 (host) (adapter 1)  
   default: 22 (guest) => 2222 (host) (adapter 1)  
 ==> default: Running 'pre-boot' VM customizations...  
 ==> default: Booting VM...  
 ==> default: Waiting for machine to boot. This may take a few minutes...  
   default: SSH address: 127.0.0.1:2222  
   default: SSH username: vagrant  
   default: SSH auth method: private key  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  
   default: Warning: Remote connection disconnect. Retrying...  

[SOLUTION] Vagrant box authentication failure after packaging box

2 Comments
ERROR IN NEWLY PACKAGED BOX AFTER - vagrant up


 Bringing machine 'default' up with 'virtualbox' provider...  
   ==> default: Clearing any previously set forwarded ports...  
   ==> default: Clearing any previously set network interfaces...  
   ==> default: Preparing network interfaces based on configuration...  
     default: Adapter 1: nat  
     default: Adapter 2: hostonly  
   ==> default: Forwarding ports...  
     default: 22 => 2222 (adapter 1)  
   ==> default: Running 'pre-boot' VM customizations...  
   ==> default: Booting VM...  
   ==> default: Waiting for machine to boot. This may take a few minutes...  
     default: SSH address: 127.0.0.1:2222  
     default: SSH username: vagrant  
     default: SSH auth method: private key  
     default: Warning: Connection timeout. Retrying...  
     default: Warning: Authentication failure. Retrying...  
     default: Warning: Authentication failure. Retrying...  
     default: Warning: Authentication failure. Retrying...  
     default: Warning: Authentication failure. Retrying...  
     default: Warning: Authentication failure. Retrying...  
     default: Warning: Authentication failure. Retrying...  
     default: Warning: Authentication failure. Retrying...  

SOLUTION

1. Press CTRL + Z to break the 'default: Warning: Authentication failure. Retrying... or wait for few more minutes

2. Login into your guest machine - vagrant ssh , which should prompt you for password, vagrant , the default password for vagrant

3. Then go to - /home/vagrant/.ssh  and remote all the contents inside it, if the path not existed create the directory - mkdir -p /home/vagrant/.ssh

 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me