Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » Joomla »

icons en google maps

Estas en el tema de icons en google maps en el foro de Joomla en Foros del Web. hola instale un componente que anda muy bien que se llama Google Maps multipage ya localice algunas marcas y todo ok. ahora quiero personalizar los ...
  #1 (permalink)  
Antiguo 30/07/2010, 10:16
Avatar de hendrix  
Fecha de Ingreso: agosto-2003
Ubicación: chile lindo
Mensajes: 1.109
Antigüedad: 20 años, 7 meses
Puntos: 7
icons en google maps

hola

instale un componente que anda muy bien que se llama Google Maps multipage

ya localice algunas marcas y todo ok.

ahora quiero personalizar los iconos para una categoria de puntos y no me funciona.

lo que hice fue:

1.- crear la categoria y colocarle en la descripcion en numero 12
2.- subir a la carpeta markers los iconos custom-shadow.png y custom-icon.png
3.- subir una marca y colocarla en la categoria.

y no me funciona, ¿¿que faltara hacer??

archivo que se debe editar gicons.js

// custom marker icons - address, shadow, marker(s)
var iconSet7 = new Array(mosConfig_live_site + '/components/' + option + '/markers/custom-','shadow','icon');

// base icon for custom icons
var customIcon1 = new GIcon();
customIcon1.iconSize = new GSize(31,27);
customIcon1.shadowSize = new GSize(31,27);
customIcon1.iconAnchor = new GPoint(8,27);
customIcon1.infoWindowAnchor = new GPoint(5,1);

// add custom icon(s)
customIcon1.shadow = iconSet7[0] + iconSet7[1] + '.png';
for (var i = 2, n = baseIcon.length; i < iconSet7.length; i++, n++) {
baseIcon[n] = new GIcon(customIcon1);
baseIcon[n].image = iconSet7[0] + iconSet7[i] + '.png';
}
*/

estas son las instrucciones:

[I]7. Custom icons for category

To use this feature simply put a number in the description field of the category that corresponds to the base icon in the gicons.js file. By default you can use numbers 0-11. 0 = Standard icon, large. 1 = Second color icon, large (active marker in search map). 2-11 = Small icons, various colors. To add your own icons just edit the gicons file appropriately.

In order to add custom icons (number 12 and above) rather than replacing predefined icons, put your custom-shadow.png and custom-icon.png in the markers directory (replace "custom" with a name of your choice). Amend the following lines to gicons.js:

// custom marker icons - address, shadow, marker(s)
var iconSet7 = new Array(mosConfig_live_site + '/components/' + option + '/markers/custom-','shadow','icon');

// base icon for custom icons
var customIcon1 = new GIcon();
customIcon1.iconSize = new GSize(31,27);
customIcon1.shadowSize = new GSize(31,27);
customIcon1.iconAnchor = new GPoint(8,27);
customIcon1.infoWindowAnchor = new GPoint(5,1);

// add custom icon(s)
customIcon1.shadow = iconSet7[0] + iconSet7[1] + '.png';
for (var i = 2, n = baseIcon.length; i < iconSet7.length; i++, n++) {
baseIcon[n] = new GIcon(customIcon1);
baseIcon[n].image = iconSet7[0] + iconSet7 + '.png';
}

You have to adjust the icon size, shadow size and anchor points to fit the size of your icon. This new icon can be displayed on the map by putting the number 12 in the according category description field. If the first line is changed to

var iconSet7 = new Array(mosConfig_live_site + '/components/' + option + '/markers/custom-','shadow','black','white','red');

and there are three icons named custom-black.png, custom-white.png, custom-red.png (and actually colored this way) in the markers directory, the number 12 will display a black icon, 13 a white icon and 14 a red icon all same size and same shadow. To add more than one icon shape, repeat the above lines and change iconSet7 to iconSet8 and customIcon1 to customIcon2.

Google Earth icons are not affected by this modifications. During icon testing "Dynamic XML Creation" should be set to "Yes".


se agradece.

saludos

Etiquetas: google, maps
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:59.