Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 12 su 12

Hybrid View

  1. #1
    Utente di HTML.it L'avatar di Mon91
    Registrato dal
    Jul 2013
    Messaggi
    52
    Quote Originariamente inviata da Mon91 Visualizza il messaggio
    Sto controllando il codice java con cui ho riempito il database anche se spero vivamente di non dover partire da zero a creare il database. Purtroppo staticamente crea tutti i markers che voglio, ma quando passo al dinamico e al.jsp non funziona più nulla!
    Spero di postare a breve la soluzione
    RAGAZZI FINALMENTE MOSTRA I MARKERS, MA, PERCHE' Cè SEMPRE UN MA NON LI MOSTRA TUTTI!

    codice:
         function addMarker(posizione, titolo,contenuto){
            var marker = new google.maps.Marker({
             position: posizione,
             map: map,
             title:titolo  }); 
             
             var infowindow = new google.maps.InfoWindow({content: contenuto});
             google.maps.event.addListener(marker, 'click', function() {infowindow.open(map, marker);});         
             return marker;
          }
          
          function geocode(indirizzo,desc,content){
            geocoder.geocode( { 'address': indirizzo}, function(results, status) {
                                                            if (status == google.maps.GeocoderStatus.OK) {
                                                            addMarker(results[0].geometry.location,desc,content);
                                                                                    }
                                                                                 }
            );
          }
    
          var map;
          var geocoder = new google.maps.Geocoder();
          function initialize() {
            var mapOptions = {
              center: new google.maps.LatLng(44.6885,10.6649),
              zoom: 9,
              mapTypeId: google.maps.MapTypeId.ROADMAP
              
              /*
              ROADMAP displays the normal, default 2D tiles of Google Maps.
              SATELLITE displays photographic tiles.
              HYBRID displays a mix of photographic tiles and a tile layer for prominent features (roads, city names).
              TERRAIN displays physical relief tiles for displaying elevation and water features (mountains, rivers, etc.).
              */
             
            };
            map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
          }
          
    
          google.maps.event.addDomListener(window, 'load', initialize);
    codice:
         <html>
      <head>
        <jsp:useBean class="beans.Bean" id="gpb"></jsp:useBean>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <style type="text/css">
          #map-canvas { height: 100%; 
                        width: 100%;
                        border: 0%;
                        padding: 0%;
                      }
                    
        </style>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
        <script type="text/javascript" src="main.js"></script>
        <script type="text/javascript">
        function addP(){
        <%=gpb.getElements()%>
        }
        </script>
      </head>
      <body>
        <h1 onclick="addP()"><strong><u>Cliccando qui</u> potrete visualizzare le sedi convenzionate con noi!</strong></h1>
        <div id="map-canvas"></div>
      </body>
    </html>
    HO CREATO UNA APPOSITA PAGINA JS, COME CONSIGLIATO! NON STO A RIPOSTARE IL CODICE JAVA CHE NON CREA PROBLEMI!

    COME POSSO RISOLVERE IL FATTO CHE MOSTRI SOLTANTO DIECI SU CIRCA NOVANTA MARKERS?

    GRAZIE DAVVERO A TUTTI PER L'ATTENZIONE CHE MI AVETE DATO FIN DAI PRIMI GIORNI... GRAZIE RAGAZZI

  2. #2
    Utente di HTML.it L'avatar di Mon91
    Registrato dal
    Jul 2013
    Messaggi
    52
    RAGAZZI FINALMENTE MOSTRA I MARKERS, MA, PERCHE' Cè SEMPRE UN MA NON LI MOSTRA TUTTI!
    POSTO PER CHIAREZZA LA PAGINA JS E LA JSP
    codice:
         function addMarker(posizione, titolo,contenuto){
            var marker = new google.maps.Marker({
             position: posizione,
             map: map,
             title:titolo  }); 
             
             var infowindow = new google.maps.InfoWindow({content: contenuto});
             google.maps.event.addListener(marker, 'click', function() {infowindow.open(map, marker);});         
             return marker;
          }
          
          function geocode(indirizzo,desc,content){
            geocoder.geocode( { 'address': indirizzo}, function(results, status) {
                                                            if (status == google.maps.GeocoderStatus.OK) {
                                                            addMarker(results[0].geometry.location,desc,content);
                                                                                    }
                                                                                 }
            );
          }
    
          var map;
          var geocoder = new google.maps.Geocoder();
          function initialize() {
            var mapOptions = {
              center: new google.maps.LatLng(44.6885,10.6649),
              zoom: 9,
              mapTypeId: google.maps.MapTypeId.ROADMAP
              
              /*
              ROADMAP displays the normal, default 2D tiles of Google Maps.
              SATELLITE displays photographic tiles.
              HYBRID displays a mix of photographic tiles and a tile layer for prominent features (roads, city names).
              TERRAIN displays physical relief tiles for displaying elevation and water features (mountains, rivers, etc.).
              */
             
            };
            map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
          }
          
    
          google.maps.event.addDomListener(window, 'load', initialize);
    codice:
         <html>
      <head>
        <jsp:useBean class="beans.Bean" id="gpb"></jsp:useBean>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <style type="text/css">
          #map-canvas { height: 100%; 
                        width: 100%;
                        border: 0%;
                        padding: 0%;
                      }
                    
        </style>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
        <script type="text/javascript" src="main.js"></script>
        <script type="text/javascript">
        function addP(){
        <%=gpb.getElements()%>
        }
        </script>
      </head>
      <body>
        <h1 onclick="addP()"><strong><u>Cliccando qui</u> potrete visualizzare le sedi convenzionate con noi!</strong></h1>
        <div id="map-canvas"></div>
      </body>
    </html>
    HO CREATO UNA APPOSITA PAGINA JS, COME CONSIGLIATO! NON STO A RIPOSTARE IL CODICE JAVA CHE NON CREA PROBLEMI!

    COME POSSO RISOLVERE IL FATTO CHE MOSTRI SOLTANTO DIECI SU CIRCA NOVANTA MARKERS?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.