Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/10/2010, 10:35
pakillo
 
Fecha de Ingreso: mayo-2004
Mensajes: 400
Antigüedad: 20 años
Puntos: 0
¿como personalizar el icono de googlemap?

Hola tengo un codigo que muestra una ubicacion pero aparece con el icono del globo que tiene googlemap, como puedo cambiarlo por uno de la empresa? la imagen y esdo se que tengo que crearla, pero que codigo tengo que agregar? yo tengo el siguiente codigo que muestra el mapa con la ubicacion

Cita:
function initializeGoogleMap() {
// set latitude and longitude to center the map around
var latlng = new google.maps.LatLng(39.7913,
-104.9580);

// set up the default options
var myOptions = {
zoom: 14,
center: latlng,
navigationControl: true,
navigationControlOptions:
{style: google.maps.NavigationControlStyle.DEFAULT,
position: google.maps.ControlPosition.TOP_LEFT },
mapTypeControl: true,
mapTypeControlOptions:
{style: google.maps.MapTypeControlStyle.DEFAULT,
position: google.maps.ControlPosition.TOP_RIGHT },

scaleControl: true,
scaleControlOptions: {
position: google.maps.ControlPosition.BOTTOM_LEFT
},
mapTypeId: google.maps.MapTypeId.ROADMAP,
draggable: true,
disableDoubleClickZoom: false,
keyboardShortcuts: true
};
var map = new google.maps.Map(document.getElementById("mapCanvas "), myOptions);
if (false) {
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
}
if (false) {
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map);
}
if (true) {
addMarker(map,39.7913,-104.9580,"Oficinas");
}
}

window.onload = initializeGoogleMap();

// Add a marker to the map at specified latitude and longitude with tooltip
function addMarker(map,lat,long,titleText) {
var markerLatlng = new google.maps.LatLng(lat,long);
var marker = new google.maps.Marker({
position: markerLatlng,
map: map,
title:"Oficinas",
icon: ""});
}
Saludos