Click here to Skip to main content
15,902,854 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to vie documents in webpage Pin
hammathMuneerul huda6-Sep-12 2:09
hammathMuneerul huda6-Sep-12 2:09 
AnswerRe: how to vie documents in webpage Pin
Sandeep Mewara6-Sep-12 7:04
mveSandeep Mewara6-Sep-12 7:04 
QuestionASP.net(VB) MARQUEE Pin
Jasbeer Singh6-Sep-12 1:55
professionalJasbeer Singh6-Sep-12 1:55 
AnswerRe: ASP.net(VB) MARQUEE Pin
Sandeep Mewara6-Sep-12 7:06
mveSandeep Mewara6-Sep-12 7:06 
GeneralRe: ASP.net(VB) MARQUEE Pin
Jasbeer Singh6-Sep-12 19:26
professionalJasbeer Singh6-Sep-12 19:26 
AnswerRe: ASP.net(VB) MARQUEE Pin
Sandeep Mewara6-Sep-12 22:39
mveSandeep Mewara6-Sep-12 22:39 
GeneralRe: ASP.net(VB) MARQUEE Pin
Jasbeer Singh6-Sep-12 23:48
professionalJasbeer Singh6-Sep-12 23:48 
QuestionGooglemaps asp.net Pin
Orhai6-Sep-12 1:52
Orhai6-Sep-12 1:52 
Am trying to make a map with markers , the lat and lng are stored in mdb file , but I want also to display the markers with the name of the location in a GridView1, but whatever am doing is not working , this is what I have tired till now... so can anyone help plz ?

C#
function initialize() {

         if (GBrowserIsCompatible()) {
             var gmarkers = [];
             var gicons = [];

             var baseIcon = new GIcon(G_DEFAULT_ICON);
             baseIcon.iconAnchor = new GPoint(9, 34);
             baseIcon.iconSize = new GSize(20, 34);
             baseIcon.infoWindowAnchor = new GPoint(9, 2);
          // A function to create the marker and set up the event window
             function createMarker(point, name, html, category) {
                 var marker = new GMarker(point, gicons[category]);
                 // === Store the category and name info as a marker properties ===
                 marker.mycategory = category;
                 marker.myname = name;
                 GEvent.addListener(marker, "click", function () {marker.openInfoWindowHtml(html);});
                 gmarkers.push(marker);
                 return marker;
             }

             // == shows all markers of a particular category, and ensures the checkbox is checked ==
             function show(category) {
                 for (var i = 0; i < gmarkers.length; i++) {
                     if (gmarkers[i].mycategory == category) {
                         gmarkers[i].show();
                     }
                 }
                 // == check the checkbox ==
                 document.getElementById(category + "box").checked = true;
             }

             // == hides all markers of a particular category, and ensures the checkbox is cleared ==
             function hide(category) {
                 for (var i = 0; i < gmarkers.length; i++) {
                     if (gmarkers[i].mycategory == category) {
                         gmarkers[i].hide();
                     }
                 }
                 // == clear the checkbox ==
                 document.getElementById(category + "box").checked = false;
                 // == close the info window, in case its open on a marker that we just hid
                 map.closeInfoWindow();
             }

             // == a checkbox has been clicked ==
                 function boxclick(box, category) {
                     if (box.checked) {
                         show(category);
                     } else {
                         hide(category);
                     }
                     // == rebuild the side bar
                     makeSidebar();
                 }

                     function myclick(i) {
                         GEvent.trigger(gmarkers[i], "click");
                     }


             // == rebuilds the sidebar to match the markers currently displayed ==
                     function makeSidebar() {
                         var html = "";
                         for (var i = 0; i < gmarkers.length; i++) {
                             if (!gmarkers[i].isHidden()) {
                                 html += '<a href="javascript:myclick(' + i + ')">' + gmarkers[i].myname + '<\/a><br>';
                             }
                         }
                         document.getElementById("side_bar").innerHTML = html;
                     }


             // create the map
            var map = new GMap2(document.getElementById("map"));

             map.addControl(new GLargeMapControl());
             map.addControl(new GMapTypeControl());
             map.setCenter(new GLatLng(53.8363, -3.0377), 11);
             // Read the data
            //  GDownloadUrl("categories.xml", function (doc) {
            //  var xmlDoc = GXml.parse(doc);


         var markers = document.getElementById('<%= GridView1.ClientID %>');
            for (var row = 1; row < markers.rows.length; row++) {
                for (var col = 0; col < markers.rows[row].cells.length; col++) {

                                          if (col == 0) {
                                         //   var heading = '';
                                            if (document.all)
                                              var  heading = new markers.rows[row].cells[col].innerText;
                                            else
                                               var heading = new markers.rows[row].cells[col].textContent;
                                        }
                                        if (col == 1) {
                                        //    var terrnaam = '';
                                            if (document.all)
                                            var terrnaam = new markers.rows[row].cells[col].innerText;
                                            else
                                             var terrnaam = new markers.rows[row].cells[col].textContent;
                                        }

                                        if (col == 2) {
                                         //   var lat = '';
                                            if (document.all)
                                              var  lat = new markers.rows[row].cells[col].innerText;
                                            else
                                              var  lat = new parseFloat(markers.rows[row].cells[col].textContent);
                                        }


                                        if (col == 3) {
                                      //      var lng = '';
                                            if (document.all)
                                               var lng = new parseFloat(markers.rows[row].cells[col].innerText);
                                            else
                                             var   lng = new parseFloat(markers.rows[row].cells[col].textContent);
                                        }
                                         if (col == 4) {
                                       //     var address = '';
                                            if (document.all)
                                             var   address = new markers.rows[row].cells[col].innerText;
                                            else
                                              var  address = new markers.rows[row].cells[col].textContent;
                                        }

                                          if (col == 5) {
                                   //         var category = '';
                                            if (document.all)
                                               var category = new markers.rows[row].cells[col].innerText;
                                            else
                                                var category = new markers.rows[row].cells[col].textContent;
                                        }

                                        else
                                        if (document.all){
                                                var str = new markers.rows[row].cells[col].innerText;
                         var point = new GLatLng(lat, lng);
                                                      html = terrnaam + ' ' + address;
                                                      var marker = new createMarker(point, name, html, category);
                                                      map.addOverlay(marker);
                                }
                                        //    heading = heading + '\n';

                                }


                              //-----------------------------
                // == show or hide the categories initially ==
                 show("terreinen");
              //   hide("gebouwen");
                 show("gebouwen");
                 // == create the initial sidebar ==
          makeSidebar();
          }
           }
            //-----------------------------
         else {
             alert("Sorry, the Google Maps API is not compatible with this browser");
        }  }
</script>






















terreinen:   
gebouwen:   


Questioncheck size of file in fileupload Pin
ptvce5-Sep-12 22:28
ptvce5-Sep-12 22:28 
AnswerCross-post alert Pin
Shameel5-Sep-12 23:03
professionalShameel5-Sep-12 23:03 
GeneralCleaning Files on browser's close button Pin
Ashwani vishwakarma5-Sep-12 6:37
Ashwani vishwakarma5-Sep-12 6:37 
QuestionRe: Cleaning Files on browser's close button Pin
Pete O'Hanlon5-Sep-12 6:48
mvePete O'Hanlon5-Sep-12 6:48 
QuestionLet my support users log on as they where a regular customer user Pin
anderslundsgard5-Sep-12 5:53
anderslundsgard5-Sep-12 5:53 
Questiongrid view Pin
Member 93914185-Sep-12 3:09
Member 93914185-Sep-12 3:09 
AnswerRe: grid view Pin
Sandeep Mewara5-Sep-12 4:48
mveSandeep Mewara5-Sep-12 4:48 
QuestionProblem in property grid Pin
Soni_moni4-Sep-12 18:11
Soni_moni4-Sep-12 18:11 
AnswerRe: Problem in property grid Pin
Sandeep Mewara4-Sep-12 19:05
mveSandeep Mewara4-Sep-12 19:05 
Questioncan one asp custom validator control be used for multiple controls Pin
PP from bangalore4-Sep-12 9:06
PP from bangalore4-Sep-12 9:06 
QuestionLabel Value Using JavaScript Pin
pknarun4-Sep-12 3:22
pknarun4-Sep-12 3:22 
AnswerRe: Label Value Using JavaScript Pin
Sandeep Mewara4-Sep-12 19:28
mveSandeep Mewara4-Sep-12 19:28 
QuestionRdlc Pin
ashwani Kumar Una3-Sep-12 22:27
ashwani Kumar Una3-Sep-12 22:27 
AnswerRe: Rdlc Pin
Sandeep Mewara4-Sep-12 19:31
mveSandeep Mewara4-Sep-12 19:31 
Questionupdating multiple tables,dataadapter,transaction Pin
SaturnPlanet3-Sep-12 6:54
SaturnPlanet3-Sep-12 6:54 
QuestionCrystal Report Pin
ashwani Kumar Una3-Sep-12 4:10
ashwani Kumar Una3-Sep-12 4:10 
AnswerRe: Crystal Report Pin
Wes Aday3-Sep-12 5:07
professionalWes Aday3-Sep-12 5:07 

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.