[Cartoweb-users] trouble with new smarty template/ DHTML API

karsten vennemann karsten at terragis.net
Tue Dec 4 05:05:30 EST 2007


Ok I'll try to work it out. 

Forr now none of the parent and grandparent elements have absolute
positioning . However, I have a pretty nested structure and I found one
element that had absolute positioning up higher in the hierarchy.

Could that influence the dynamic calculation ?

 

When I changed it to "relative" that didn't  help either to fix the setoff.

 

In style sheet I have for html and body:

 

html, body {

            font-family:Arial,Helvetica,sans-serif;

            color:#333333;

            font-size:12px;

            background-color:#639A9B;

            margin:0;

            padding:0;

            position: absolute;

}

Does that sound ok ?

 

I was testing mainly in Firefox 2.0.0.11 on winXP, however got the same
offset problem when using IE 6.0.

 

Karsten

  _____  

From: Oliver Christen [mailto:oliver.christen at camptocamp.com] 
Sent: Tuesday, December 04, 2007 01:50
To: karsten vennemann; cartoweb-users at lists.maptools.org
Subject: Re: [Cartoweb-users] trouble with new smarty template/ DHTML API 

 

you cant, the values are dynamicaly calculated, thats the problem.

it mainly depends of the structuration of element in your page and their css
properties

 

though you shouldnt have any problem as long as you dont use absolute
positionning for the elements enclosing the map elements

 

----- Original Message ----- 

From: karsten <mailto:karsten at terragis.net>  vennemann 

To: cartoweb-users at lists.maptools.org 

Sent: Tuesday, December 04, 2007 10:45 AM

Subject: RE: [Cartoweb-users] trouble with new smarty template/ DHTML API 

 

I forgot to include in my last message that the offset is now larger than
before: left: 315px; top: 154px;

In firebug -  when I set those =0  everyting is fine. However how can I make
cartoweb set those = 0 ?

Karsten

 


  _____  


From: karsten vennemann [mailto:karsten at terragis.net] 
Sent: Tuesday, December 04, 2007 01:40
To: 'cartoweb-users at lists.maptools.org'
Subject: RE: [Cartoweb-users] trouble with new smarty template/ DHTML API 

 

 

In my cartoclient.tpl I have now

 

.

<div title="groundSurface" style="width: 700px; height: 500px; position:
relative; top: 0px; left: 0px;">{include file="mainmap.tpl"} </div>

.

 

And in mainmap.tpl

.

<div style="position: relative; top: 0px; left: 0px;">

  <div id="map" class="map"
style="width:{$mainmap_width}px;height:{$mainmap_height}px;">

{* nothing here, DHTML API will run with the given class name *}

  </div>

</div>

.

 

Both "parent" divs now have relative position, however I still get the
offset of the map image.

I have no Idea what is going wrong.

Thanks
Karsten 


  _____  


From: Oliver Christen [mailto:oliver.christen at camptocamp.com] 
Sent: Tuesday, December 04, 2007 01:06
To: karsten vennemann; cartoweb-users at lists.maptools.org
Subject: Re: [Cartoweb-users] trouble with new smarty template/ DHTML API 

 

Hi

 

you shouldnt touch the map element and its children as the dhtml is quite
sensible to that, but you can enclose it in a parent element (div, table,
...) and then give a relative positionning to the parent, this should solve
the miscalculation of the map element and its children.

 

regards

Oliver

----- Original Message ----- 

From: karsten <mailto:karsten at terragis.net>  vennemann 

To: cartoweb-users at lists.maptools.org 

Sent: Tuesday, December 04, 2007 9:16 AM

Subject: [Cartoweb-users] trouble with new smarty template/ DHTML API 

 

Hi All,


I'm working on a new smarty template for my cartoweb project. Map and
leftbar show up, however the main map and its containing div don't line up:
 The map is unintentionally offset by 15px from the left and 69px down. In
Firebug I can see that there is a tag
<div id="map_rootLayer" class="layer" style="position: absolute; width:
700px; height: 500px; clip: rect(0px, 700px, 500px, 0px); left: 15px; top:
69px;"> that contains this unwanted off set but it seems that it somehow is
attributed by cartoweb dynamically.

 

I found this (uncomplete div) in the main.tpl of my project:


  <div id="map" class="map"
style="width:{$mainmap_width}px;height:{$mainmap_height}px;">

{* nothing here, DHTML API will run with the given class name *}

  </div>


I couldn't figure out how to change the left and top offset (totally get rid
of the offset), neither figure out where to find the DHTML API nor what it
does.

Any insights/explanation on what's going on here and how I can fix it?

Thanks
Karsten

 


  _____  


_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users


  _____  


_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071204/72b75f7f/attachment-0001.html


More information about the Cartoweb-users mailing list