Timemap with many datasets

105 views
Skip to first unread message

JoseJe

unread,
Nov 8, 2012, 6:15:16 AM11/8/12
to timemap-d...@googlegroups.com

I would like to load some gss in the same timemap, and I would like have a form or a checkbox to change the active gss. Anybody knows how to do it?
Here is part of my code:
----
datasets: [
            {
                title: "Short Sea Shipping",
                id: "SSS",
                theme: "red",
                type: "gss",
                options: {
                   
                    key: "***",
                  
                    paramMap: {
                        start: "Any Servei",
                        lat: "Y",
                        lon: "X",
                        title: "Puertos",
                        description: "Passatgers",//no me muestra los datos de toneladas
                        tags: ['SSS']
                    }
                }
            },{
                title: "Exportaciones",
                id: "Exportaciones",
                theme: "red",
                type: "gss",
                options: {
                  
                    key: "*****",
                  
                    paramMap: {
                        start: "Any Estadístic",
                        lat: "Y",
                        lon: "X",
                        title: "Port Destí",
                        tags: ['Exportaciones']
                    }
                }
            }
           
        ],
----------
<div id="filtro">
    <div id="FILTROS">
     <form>
        <select id="tag_select">
            <option value="">All tags</option>
            <option value="SSS">Short Sea Shipping</option>
            <option value="Exportaciones">Exportaciones</option>
        </select>
    </form>
    </div>

Nick Rabinowitz

unread,
Nov 10, 2012, 11:03:25 AM11/10/12
to famio...@msn.com, timemap-d...@googlegroups.com
Hello -

You might check out the Renaissance Artists and Authors example: http://timemap.googlecode.com/svn/tags/2.0.1/examples/artists.html

This loads two separate datasets (though not GSS) and offers a checkbox toggle for each. It should be straightforward to adapt this for GSS datasets.

-Nick



--
You received this message because you are subscribed to the Google Groups "Timemap.js Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/timemap-development/-/ZVXsea-knWQJ.
To post to this group, send email to timemap-d...@googlegroups.com.
To unsubscribe from this group, send email to timemap-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/timemap-development?hl=en.

Message has been deleted

JoseJe

unread,
Nov 16, 2012, 7:17:04 AM11/16/12
to timemap-d...@googlegroups.com, famio...@msn.com, ni...@nickrabinowitz.com
Thanks!
Now I have a new problem :P
How can I load a KML in a  'google maps v3'??
I think that the problem is about the options but I dont know how to fix

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></
script>
-------------------------------------------------------------------------------------
    <script src="../timemap.2.0.1/src/timemap.js" type="text/javascript"></script>
....(etc)
--------------------------------------------------------------------------------
 var tm;
$(function() {  

var styledMapType = new google.maps.StyledMapType([
        {
            featureType: "water",
            elementType: "all",
            stylers: [
              { saturation: 0 },
              { lightness: 100 }
            ]
        },
        {
            featureType: "all",
            elementType: "all",
            stylers: [
              { saturation: -100 }
            ]
        }
    ], {
        name: "white"
    });
   
    tm = TimeMap.init({
        mapId: "map",               // Id of map div element (required)
        timelineId: "timeline",     // Id of timeline div element (required)
        options: {
            eventIconPath: "../images/"
        },
        datasets: [
            {
                id: "artists",
                title: "SSS",
                theme: "orange",
                // note that the lines below are now the preferred syntax
                type: "kml",
                options: {
            url:"SSS Any Servei.kml",

           
                }
            }
        ],
...........
-Nick

To unsubscribe from this group, send email to timemap-development+unsub...@googlegroups.com.

Nick Rabinowitz

unread,
Nov 16, 2012, 1:24:34 PM11/16/12
to famio...@msn.com, timemap-d...@googlegroups.com

What errors do you see? And does your KML file name really have spaces in it? That won't work - you need a properly formed URL to load (you could replace the spaces with "%20" to get it working, if this is the problem).

-Nick


To post to this group, send email to timemap-d...@googlegroups.com.
To unsubscribe from this group, send email to timemap-develop...@googlegroups.com.

JoseJe

unread,
Nov 19, 2012, 3:58:14 AM11/19/12
to timemap-d...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages