Hola tengo problemas con los checkbox, ya que puse el codigo asi como
el ejemplo de Mike :
http://econym.org.uk/gmap/example_categories.htm
pero no se porque no hacen nada, yo leo los datos de un archivo JSON,
y pues el codigo q tengo tiene los cambios necesarios para leer los
datos de JSON y no de XML. Pero como dije, no funcionan, el mapa me
aparece con todos los markers y no pasa nada si activo un checkbox,
los markers que tengo tambien son creados por mi, por lo que las
primeras lineas de gmarkers[ " "] no las puse porque mas adelante se
ponen, pero no se si este bien.
Esto es como tengo la primera parte dell codigo en donde no coloco lo
de los gmarkers:
if (GBrowserIsCompatible()) {
// Display the map, with some controls
var map = new GMap(document.getElementById("map"));
map.setCenter(new GLatLng(19.804541,-58.699219),2);
map.addControl(new GMapTypeControl());
map.addControl(new GLargeMapControl());
map.setMapType(G_HYBRID_MAP);
// arrays to hold copies of the markers and html used by the
side_bar
// because the function closure trick doesnt work there
var side_bar_html = "";
var titulo="<strong>Portales</strong><br><br>";
var gmarkers = [];
var totdes;
var algo;
var tap2;
var tap3;
var anioaux="";
var anioact="";
var estilo="";
var wd="";
var band=0;
estilo="<style type='text/css'>#myScroll{position:relative; left:
12px;top:5px;width:480px; height:150px; z-index:
1;border:hidden;scrollbar-arrow-color:#FFFFFF;scrollbar-track-
color:#E6E6E6;scrollbar-shadow-color:#CCCCCC;scrollbar-face-
color:#800000;scrollbar-highlight-color:#FFFFFF;scrollbar-darkshadow-
color:#FFFFFF;scrollbar-3dlight-color:#FFFFFF}#myScroll {overflow:
auto}a:link {font-family:Arial;font-style: normal;font-size: 12px;text-
decoration:none; color : #000000;} a:visited {font-family:Arial;font-
style: normal;font-size: 12px;text-decoration : none;color :
#000000;}a:active{font-family:Arial;font-style: normal;font-size:
12px;text-decoration : none;color : #000000;} a:hover {font-
family:Arial;font-style: normal;font-size: 12px;text-decoration :
none;color : #b10c07;}td {font-family: Arial; font-size: 12px; font-
style: normal;}</style>";
// A function to create the marker and set up the event window
side_bar_html = estilo +
" " + titulo;
//********
var gmarkers = [];
var globalindx = 0;
function createMarker2(point,infotabs,tipo,name) {
var color="";
var icon = new GIcon();
icon.image = "images/icon"+tipo+".png";
icon.shadow =
"images/redalyc_shadow.png";
icon.iconSize = new GSize(32, 32);
icon.shadowSize = new GSize(32, 32);
icon.iconAnchor = new GPoint(16, 32);
icon.infoWindowAnchor = new GPoint(16,
0);
var marker = new GMarker(point,icon);
marker.mytype = tipo;
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowTabsHtml(infotabs); //muestra la info
});
Tambien en la parte del codigo de mike donde se declaran estas
variables:
marker.mycategory = category;
marker.myname = name;
no se si influya el que yo cambie mycategory por mytipo=tipo, porque
el campo del json que tengo se llama tipo, y el marker lo estoy
generando con esto:
function createMarker2(point,infotabs,tipo,name) {
no tengo ningun campo category .
Saludos y espero puedan ayudarme.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---