[Cartoweb-users] trouble with new smarty template/ DHTML API
Oliver Christen
oliver.christen at camptocamp.com
Tue Dec 4 04:46:36 EST 2007
dont modify the mainmap.tpl unless you really need to and I dont think you need to do it here.
top: 0px; left: 0px; have no meaning when using position: relative;
instead, define the margin and padding for the element html and body to 0 in your css
by the way, in what browser are you testing ?
----- Original Message -----
From: karsten vennemann
To: cartoweb-users at lists.maptools.org
Sent: Tuesday, December 04, 2007 10:39 AM
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
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/2aeee8aa/attachment-0001.html
More information about the Cartoweb-users
mailing list