I changed the css file so the timeline and map are both 100% heigth and
50% wide
div#timelinecontainer {
position: absolute;
top: 3ex;
height: 100%;
width: 50%;
}
div#timeline {
height: 100%;
font-size: 8pt;
}
div#mapcontainer {
position: absolute;
left: 50%;
height: 100%;
width: 50%;
}
div#map {
width: 100%;
height: 100%;
}
I also gave the YEAR and MONTH bands more space.
var bandInfos = [
Timeline.createBandInfo({
showEventText: false,
eventSource: eventSource,
width: "10%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 200,
trackHeight: 1.0,
trackGap: 0.2
}),
Timeline.createBandInfo({
showEventText: false,
eventSource: eventSource,
width: "10%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 200,
trackHeight: 1.0,
trackGap: 0.2
}),
Timeline.createBandInfo({
eventSource: eventSource,
width: "80%",
intervalUnit: Timeline.DateTime.DAY,
intervalPixels: 205
})
];
Then now the empty timelines are drawn.
But when I than try the following cases
http://www.ikcro.nl/php/test/timeline/usgseq_ikcro.php?days=60
Gives error
Line: 82
Cahracter: 9
Error: 'documentElement'is empty or not an object
When I use a more complex query
http://www.ikcro.nl/php/test/timeline/usgseq_ikcro_thes.php?thesaurusname=ikc-thema&concept=Ruimtelijke+Ordening&soortlist=nieuws&days=90
Gives error
Line: 96
Character: 13
Error: Object expected
What would be the best place to put the timedelay in?
Greetings,
Niek
David Huynh schreef:
> In IE, the timeline gets initialized and laid out when the timeline
> div's height is zero. Perhaps IE hasn't quite finished laying out the
> page yet when the timeline construction code kicks in? Can you delay the
> construction of the timeline a bit or change your layout somehow so that
> the timeline div's height is large enough before the timeline gets
> constructed?
>
> David
>
> Niek van Baalen wrote:
>
>> Hello David,
>>
>> When I tried the original http://www.oe-files.de/gmaps/usgseq.html in
>> IE7 I got the same problem. So it is not my application that is causing
>> the problem, I think.
>>
>> Greetings,
>> Niek
>> David Huynh schreef:
>>
>>
>>> No, it's not that % isn't allowed. I just worry that some of the bands
>>> are too narrow. Could you try to make the bands wider (e.g., "10%"
>>> instead of "5%")?
>>>
>>> Niek van Baalen wrote:
>>>
>>>
>>>
>>>> Thanks David,
>>>>
>>>> I have this in the js file
>>>> Timeline.createBandInfo({
>>>> showEventText: false,
>>>> eventSource: eventSource,
>>>> width: "5%",
>>>> intervalUnit: Timeline.DateTime.YEAR,
>>>> intervalPixels: 200,
>>>> trackHeight: 0.50,
>>>> trackGap: 0.2
>>>> }),
>>>> Timeline.createBandInfo({
>>>> showEventText: false,
>>>> eventSource: eventSource,
>>>> width: "8%",
>>>> intervalUnit: Timeline.DateTime.MONTH,
>>>> intervalPixels: 200,
>>>> trackHeight: 0.50,
>>>> trackGap: 0.2
>>>> }),
>>>> Timeline.createBandInfo({
>>>> eventSource: eventSource,
>>>> width: "87%",
>>>> intervalUnit: Timeline.DateTime.DAY,
>>>> intervalPixels: 205
>>>>
>>>> Is it not allowed to use percentages?
>>>> Or is it that the percentages in the css file for the div's height are
>>>> not allowed?
>>>>
>>>> div#infoc {
>>>> position: absolute;
>>>> top: 0;
>>>> height: 3ex;
>>>> width: 100%;
>>>> }
>>>>
>>>> div#info {
>>>> padding: 3px 10px;
>>>> font-size: 10pt;
>>>> }
>>>>
>>>> span#data {
>>>> position: absolute;
>>>> left: 2em;
>>>> }
>>>>
>>>> span#link {
>>>> position: absolute;
>>>> right: 2em;
>>>> }
>>>>
>>>> div#timelinecontainer {
>>>> position: absolute;
>>>> top: 3ex;
>>>> bottom: 55%;
>>>> width: 100%;
>>>> }
>>>>
>>>> div#timeline {
>>>> height: 100%;
>>>> font-size: 8pt;
>>>> }
>>>>
>>>> div#mapcontainer {
>>>> position: absolute;
>>>> bottom: 0;
>>>> height: 55%;
>>>> width: 100%;
>>>> }
>>>>
>>>> div#map {
>>>> width: 100%;
>>>> height: 100%;
>>>> }
>>>>
>>>> Greetings,
>>>> Niek
>>>> David Huynh schreef:
>>>>
>>>>
>>>>
>>>>
>>>>> Niek,
>>>>>
>>>>> It is actually this line
>>>>>
>>>>> this._highlightDiv.style.height=(band.getViewWidth()-4)+"px";
>>>>>
>>>>> which can throw an exception if the band is too narrow, resulting in a
>>>>> negative height. Does the error occur if you make the bands taller?
>>>>>
>>>>> David
>>>>>
>>>>> Niek van Baalen wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hello
>>>>>>
>>>>>> In Internet Explorer (version 7)
>>>>>> http://www.ikcro.nl/php/test/timeline/usgseq_ikcro.html gives an error
>>>>>> on line 3080 which is I think :
>>>>>> this._highlightDiv.style.height=length+"px
>>>>>>
>>>>>> From /* ether-painters.js */
>>>>>>
>>>>>> this.position=function(startDate,endDate){
>>>>>> this._createHighlightDiv();
>>>>>>
>>>>>> var startPixel=Math.round(band.dateToPixelOffset(startDate));
>>>>>> var endPixel=Math.round(band.dateToPixelOffset(endDate));
>>>>>> var length=Math.max(endPixel-startPixel,3);
>>>>>> if(horizontal){
>>>>>> this._highlightDiv.style.left=startPixel+"px";
>>>>>> this._highlightDiv.style.width=length+"px";
>>>>>> this._highlightDiv.style.top="2px";
>>>>>> this._highlightDiv.style.height=(band.getViewWidth()-4)+"px";
>>>>>> }else{
>>>>>> this._highlightDiv.style.top=startPixel+"px";
>>>>>> *this._highlightDiv.style.height=length+"px";*
>>>>>> this._highlightDiv.style.left="2px";
>>>>>> this._highlightDiv.style.width=(band.getViewWidth()-4)+"px";
>>>>>> }
>>>>>> }
>>>>>> In Mozilla Firefox all works fine.
>>>>>>
>>>>>> Does anyone know a solution?
>>>>>>
>>>>>> Thanks
>>>>>> Niek van Baalen
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> General mailing list
>>>>>> [email protected]
>>>>>> http://simile.mit.edu/mailman/listinfo/general
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> General mailing list
>>>>> [email protected]
>>>>> http://simile.mit.edu/mailman/listinfo/general
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> General mailing list
>>>> [email protected]
>>>> http://simile.mit.edu/mailman/listinfo/general
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> http://simile.mit.edu/mailman/listinfo/general
>>>
>>>
>>>
>>>
>>>
>>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://simile.mit.edu/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
>
>
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general