fBirD Posted April 2, 2012 at 10:46 AM Report #447025 Posted April 2, 2012 at 10:46 AM Estou a tentar colocar baloes num mapview , ex: [ http://1dl.us/t4X ] , mas nao arranjo nenhum exemplo que seja simples para servir de referencia , porque pretendo colocar vários pontos no mapa e ao carregar neles ver uma descrição. Se alguém puder ajudar ...
Th3Alchemist Posted April 2, 2012 at 10:54 AM Report #447028 Posted April 2, 2012 at 10:54 AM balões? estás a falar de Markers ou InfoWindow? Caso que estejas a utilizar a Google Maps API 3 para JavaScript, tens aqui uma boa documentação: https://developers.google.com/maps/documentation/javascript/overlays
fBirD Posted April 3, 2012 at 04:58 PM Author Report #447309 Posted April 3, 2012 at 04:58 PM Penso que seja Markers , aqueles balões que aparecem quando carregas num pino no google maps , mas neste caso quero fazer isso para android.
Gonka Posted April 3, 2012 at 05:00 PM Report #447311 Posted April 3, 2012 at 05:00 PM http://developer.android.com/resources/tutorials/views/hello-mapview.html http://tech.truliablog.com/2012/02/23/custom-map-markers-for-android-google-maps/
fBirD Posted April 4, 2012 at 09:49 AM Author Report #447414 Posted April 4, 2012 at 09:49 AM http://developer.android.com/resources/tutorials/views/hello-mapview.html http://tech.truliablog.com/2012/02/23/custom-map-markers-for-android-google-maps/ Não é bem isso , nesse caso esses tutoriais são para criar markets personalizados o que eu quero mesmo e usar markets através de ficheiros de layout xml para poder colocar la botões e texto e personalizar dinamicamente cada um deles .
Th3Alchemist Posted April 4, 2012 at 10:03 AM Report #447418 Posted April 4, 2012 at 10:03 AM um "pino" é um marker.... uma "balão" é uma InfoWindow https://developers.google.com/maps/documentation/javascript/overlays#InfoWindows Neste exemplo tens o marker... e quando clicas nele aparece o InfoWindow var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var contentString = '<div id="content">'+ '<div id="siteNotice">'+ '</div>'+ '<h2 id="firstHeading" class="firstHeading">Uluru</h2>'+ '<div id="bodyContent">'+ '<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ' + 'sandstone rock formation in the southern part of the '+ 'Northern Territory, central Australia. It lies 335 km (208 mi) '+ 'south west of the nearest large town, Alice Springs; 450 km '+ '(280 mi) by road. Kata Tjuta and Uluru are the two major '+ 'features of the Uluru - Kata Tjuta National Park. Uluru is '+ 'sacred to the Pitjantjatjara and Yankunytjatjara, the '+ 'Aboriginal people of the area. It has many springs, waterholes, '+ 'rock caves and ancient paintings. Uluru is listed as a World '+ 'Heritage Site.</p>'+ '<p>Attribution: Uluru, <a href="http://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+ 'http://en.wikipedia.org/w/index.php?title=Uluru</a> (last visited June 22, 2009).</p>'+ '</div>'+ '</div>'; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: myLatlng, map: map, title:"Uluru (Ayers Rock)" }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); });
fBirD Posted April 6, 2012 at 12:57 PM Author Report #447903 Posted April 6, 2012 at 12:57 PM O componente InfoWindow também se aplica para o desenvolvimento de android ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now