Trying to fix map center breaks my code

20 views
Skip to first unread message

Werner Stangl

unread,
Jun 24, 2017, 5:59:38 PM6/24/17
to Timemap.js Development
Hi! I tried to fix the extent of the Timemap because I don't want one loaded dataset to interfere with automatic zooming. However, when I try to specify the option mapCenter, the widget breaks. Without the "mapCenter", the code works fine:

var tm;
$(function() {
   
    tm = TimeMap.init({
        mapId: "map",               // Id of map div element (required)
        timelineId: "timeline",     // Id of timeline div element (required)
 bandInfo: [
            {
               width:          "85%",
               intervalUnit:   Timeline.DateTime.DAY,
               intervalPixels: 210
            },
            {
               width:          "15%",
               intervalUnit:   Timeline.DateTime.MONTH,
               intervalPixels: 100,
               showEventText:  false,
               trackHeight:    0.2,
               trackGap:       0.2
            }
       ],       
       options: {
        mapType: "satellite",
            eventIconPath: "timemap2.0.1/images/",
            mapZoom: 5,
            mapCenter: 15,-70,
            centerOnItems: false,
            checkResize: false,
mapTypeControl: true,
                panControl: true,
                zoomControl: true,
                scaleControl: true,

      
        },

...
Reply all
Reply to author
Forward
0 new messages