Superponer, dibujar o agregar una vista para poner un marcador en el mapa

I am wondering about the correct approach or maybe the difference between the following if my intention is to put 2 markers on the map and maybe remove them after a while. Should I use the overlays to put them, or should I use the canvas.draw (or just draw) to put them or simply add the two images as a view and using the layout param I can set the location. I found the last one being the easiest but I need your input Thank you.

preguntado el 09 de marzo de 12 a las 16:03

Anyone???? I am surprised I have not got an asnwer yet -

1 Respuestas

Don't be surprised, this is a terrible question. Other than your two tags, you don't explain anything about the platform you're building on.

If you're building an Android app, you'd probably want to use the maps Overlay.

If you're building a web app, I would use the Google Maps Javascript API Marker.

If you're not using either, or are not using Google Maps, I have no clue how you expect people to read your mind over the internet.

respondido 10 mar '12, 06:03

Thanks for thr answrr. I thought that by tagging it to android, people would know that it is android app question. And to be sepecific 2.3. But why you would recoomend overlay over adding view? - Serpiente

You can use a view, I just figured an overlay would be simpler. If you draw it as a view, you'll need to handle updating the marker position on your own when the user zooms/pans the map. The MapView overlay will update as the map updates. Actually, I made a mistake on the original answer, I meant to use OverlayItem instead of Overlay. có… - dragonx

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.