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

karsten vennemann karsten at terragis.net
Tue Dec 4 04:45:51 EST 2007


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 vennemann <mailto:karsten at terragis.net>  

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

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


More information about the Cartoweb-users mailing list