[Cartoweb-users] Zooming in even when it should zoom out
Milo van der Linden
mlinden at zeelandnet.nl
Wed Sep 26 16:47:07 EDT 2007
My live site is here:
http://cartoweb.bosqom.nl/cartoweb34/htdocs/index.php
It is a custom template (nice looking, but not working to well) that I
got from a guy before me. The Firebug tip was Awesome!!!!! That is a
really nice tool! WAY better then the java debug console I was using.
I can see that a lot of strange things happen on the buttons:
- All this Element.hide scripts on the buttons; are they wise?
- My pdfrotate.gif is that folder is 1x1 pixel, can that be the problem?
In my custom toolbar.tpl is:
{if $tool->id == fullextent}
{* ranzige code, ophalen uit ini bestand *}
<input type="hidden" name="recenter_none"
value="-84400, 304000, 367000, 621000"/>
<a
href="javascript:document.carto_form.recenter_none.name='recenter_bbox';doSubmit();"><img
type="image" id="{$tool->id}_icon" name="{$tool->id}" src="{r
type=gfx/toolnew}{$tool->id}.gif{/r}" height="28" width="28"
onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');{if
$group != 5}Element.hide('querylayer');{/if}"
onMouseOver="updateTooltip('b_{$tool->id}')"
onMouseOut="updateTooltip()"></a>
{else}
<img type="image"
id="{$tool->id}_icon" name="{$tool->id}" src="{r
type=gfx/toolnew}{$tool->id}.gif{/r}" height="28" width="28"
onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');{if
$group != 5}Element.hide('querylayer');{/if}mainmap.{$tool->id}('map');"
onMouseOver="updateTooltip('b_{$tool->id}')"
onMouseOut="updateTooltip()">
{/if}
resulting in
cw3_tools = new
Array("zoomin","zoomout","pan","fullextent","query_by_point","query_by_bbox","query_by_polygon","query_by_circle","outline_point","outline_line","outline_rectangle","outline_poly","pdfrotate");
3 var cw3_initial_selected_tool = "mainmap.zoomin('map');";
4
5 cw3_initial_selected_tool += "setActiveToolButton('zoomin');";
6 var toolbar_rendering = 'outline';
</script>
<input id="tool" type="hidden" value="zoomin" name="tool"/>
<img id="zoomin_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_zoomin')" src="webGIS/gfx/toolnew/zoomin.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.zoomin('map');setActiveToolButton('zoomin');"/>
<img id="zoomout_icon" class="toolbar_on" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_zoomout')" src="webGIS/gfx/toolnew/zoomout.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.zoomout('map');setActiveToolButton('zoomout');"/>
<img id="pan_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_pan')" src="webGIS/gfx/toolnew/pan.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.pan('map');setActiveToolButton('pan');"/>
<img id="query_by_point_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_query_by_point')" src="webGIS/gfx/toolnew/query_by_point.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_point('map');setActiveToolButton('query_by_point');"/>
<img id="query_by_bbox_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_query_by_bbox')" src="webGIS/gfx/toolnew/query_by_bbox.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_bbox('map');setActiveToolButton('query_by_bbox');"/>
<img id="query_by_polygon_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_query_by_polygon')" src="webGIS/gfx/toolnew/query_by_polygon.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_polygon('map');setActiveToolButton('query_by_polygon');"/>
<img id="query_by_circle_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_query_by_circle')" src="webGIS/gfx/toolnew/query_by_circle.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_circle('map');setActiveToolButton('query_by_circle');"/>
<img id="pdfrotate_icon" class="toolbar_off" width="28" height="28" onmouseout="updateTooltip()" onmouseover="updateTooltip('b_pdfrotate')" src="webGIS/gfx/toolnew/pdfrotate.gif" onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.pdfrotate('map');setActiveToolButton('pdfrotate');"/>
</span>
Doesn't look like what you where telling me, can I replace the array
Loic Devaux schreef:
> This happened to me too when I disabled some tool in toolbar.tpl
> instead of disabling it with a negative weight in the ini file .
>
> var elt = xGetElementById(cw3_tools[i] + '_icon');
> if(elt == null) return;
>
> in setActiveToolButton function in carto.js couldn't find the
> "cw3_tools[i] + '_icon'" element so the loop breaked and the active
> tool stayed on zoomin.
>
> Maybe you can check "cw3_tools = new Array" in the rendered html to
> find out which tool causes the problem or make step by step debug with
> firebug.
>
> Loïc
>
> On 9/26/07, *Milo van der Linden* <mlinden at zeelandnet.nl
> <mailto:mlinden at zeelandnet.nl>> wrote:
>
> Hello list,
>
> I am having a small problem. My Cartoweb keeps zooming in, even
> when it should zoom out.
>
> Any idea?
> --
>
>
>
>
> Milo van der Linden
> skype: milovanderlinden
> mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
> milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
> milo at 3dsite.nl <mailto:milo at 3dsite.nl>
> http://www.3dsite.nl
>
>
>
> De informatie in dit bericht reflecteert mijn persoonlijke mening
> en niet die van een bedrijf of instantie. Aan de informatie kunnen
> geen rechten worden ontleend. Indien dit bericht onderdeel is van
> een forum, mailing-list of community dan gelden automatisch de bij
> het betreffende medium behorende voorwaarden. The information in
> this message reflects my personal opinion and not that of a
> company or public body. All rights reserved.If this message is
> contained in a mailing-list or community, the rights on the medium
> are automatically adapted.
>
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> <mailto:Cartoweb-users at lists.maptools.org>
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
>
--
Milo van der Linden
skype: milovanderlinden <skype:milovanderlinden?add>
mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
milo at 3dsite.nl <mailto:milo at 3dsite.nl>
http://www.3dsite.nl
De informatie in dit bericht reflecteert mijn persoonlijke mening en
niet die van een bedrijf of instantie. Aan de informatie kunnen geen
rechten worden ontleend. Indien dit bericht onderdeel is van een forum,
mailing-list of community dan gelden automatisch de bij het betreffende
medium behorende voorwaarden. The information in this message reflects
my personal opinion and not that of a company or public body. All rights
reserved.If this message is contained in a mailing-list or community,
the rights on the medium are automatically adapted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070926/a49c7a51/attachment-0001.html
More information about the Cartoweb-users
mailing list