Click here to Skip to main content
15,885,847 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionAJAX not working in IE7 on Wins Server 2003 Pin
MWRivera18-Feb-11 5:35
MWRivera18-Feb-11 5:35 
Questionjquery + iframe passing values Pin
fififlowertot16-Feb-11 22:52
fififlowertot16-Feb-11 22:52 
QuestionRe: jquery + iframe passing values Pin
Sunasara Imdadhusen16-Feb-11 23:04
professionalSunasara Imdadhusen16-Feb-11 23:04 
AnswerRe: jquery + iframe passing values Pin
fififlowertot17-Feb-11 0:33
fififlowertot17-Feb-11 0:33 
AnswerRe: jquery + iframe passing values Pin
Sunasara Imdadhusen17-Feb-11 2:11
professionalSunasara Imdadhusen17-Feb-11 2:11 
GeneralRe: jquery + iframe passing values Pin
fififlowertot17-Feb-11 2:13
fififlowertot17-Feb-11 2:13 
Questiongoogle streetview Pin
douw3rd15-Feb-11 23:58
douw3rd15-Feb-11 23:58 
AnswerRe: google streetview Pin
richardw4816-Feb-11 2:41
richardw4816-Feb-11 2:41 
These are the jscript functions you need ...

This function takes an address as a string

function showAddress(thisaddress) 
    {
     var geocoder = new GClientGeocoder();
     geocoder.setBaseCountryCode("uk");
     geocoder.getLatLng(thisaddress, gotPoint);
     searchaddress=thisaddress
    } 


The next function is called by the one above in order to show the address or marker on a map
Note that I've commented out the code that places a marker at the point

function gotPoint(pt)
    { 
      if (!pt) 
      {alert(searchaddress + " not found");} 
      else 
      { 
//     map.setCenter(point, 13); 
//     var marker = new GMarker(point); 
//     map.addOverlay(marker);
//     marker.openInfoWindowHtml(thisaddress);
       document.formInput.txtPoint.value = pt;
       panoClient.getNearestPanoramaLatLng(pt, fnearestpano);
      }
    }  



Finally, the function finds the nearest StreetView image to the address

function fnearestpano(latlng)
    {
      if (!latlng)
      { alert("nearest view not found"); }
      else
      {
          //alert("point=" + latlng);
          myPano = new GStreetviewPanorama(document.getElementById("pano"));
          myPano.setLocationAndPOV(latlng, myPOV);
      }
    }



Hope that helps?
Richard
QuestionYes/No Option in Javascript Pin
Toniyo Jackson15-Feb-11 2:39
Toniyo Jackson15-Feb-11 2:39 
AnswerRe: Yes/No Option in Javascript Pin
Pravin Patil, Mumbai15-Feb-11 2:51
Pravin Patil, Mumbai15-Feb-11 2:51 
AnswerRe: Yes/No Option in Javascript [modified] Pin
Sunasara Imdadhusen15-Feb-11 17:15
professionalSunasara Imdadhusen15-Feb-11 17:15 
GeneralRe: Yes/No Option in Javascript Pin
Ali Al Omairi(Abu AlHassan)25-Feb-11 8:34
professionalAli Al Omairi(Abu AlHassan)25-Feb-11 8:34 
AnswerRe: Yes/No Option in Javascript Pin
Ali Al Omairi(Abu AlHassan)25-Feb-11 8:21
professionalAli Al Omairi(Abu AlHassan)25-Feb-11 8:21 
AnswerRe: Yes/No Option in Javascript Pin
Monjurul Habib1-Mar-11 7:57
professionalMonjurul Habib1-Mar-11 7:57 
QuestionjQuery not working Pin
Hans Ruck11-Feb-11 3:30
Hans Ruck11-Feb-11 3:30 
AnswerRe: jQuery not working Pin
cjoki11-Feb-11 7:34
cjoki11-Feb-11 7:34 
GeneralRe: jQuery not working Pin
Hans Ruck11-Feb-11 10:12
Hans Ruck11-Feb-11 10:12 
GeneralRe: jQuery not working Pin
cjoki11-Feb-11 11:42
cjoki11-Feb-11 11:42 
AnswerRe: jQuery not working Pin
Shahriar Iqbal Chowdhury/Galib11-Feb-11 10:00
professionalShahriar Iqbal Chowdhury/Galib11-Feb-11 10:00 
AnswerRe: jQuery not working Pin
Sunasara Imdadhusen15-Feb-11 17:55
professionalSunasara Imdadhusen15-Feb-11 17:55 
AnswerRe: jQuery not working Pin
Monjurul Habib1-Mar-11 8:14
professionalMonjurul Habib1-Mar-11 8:14 
QuestionConnect a web form to access database Pin
Babylon Lion10-Feb-11 14:11
Babylon Lion10-Feb-11 14:11 
AnswerRe: Connect a web form to access database Pin
Ravi Sant16-Feb-11 3:51
Ravi Sant16-Feb-11 3:51 
GeneralRe: Connect a web form to access database Pin
Babylon Lion16-Feb-11 4:49
Babylon Lion16-Feb-11 4:49 
QuestionXML to Javascript array Pin
Member 333447410-Feb-11 2:55
Member 333447410-Feb-11 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.