Hi folks,<br><div class="comment"><p>
After some discussion with Paul <a class="changeset" href="http://trac.openlayers.org/changeset/1" title="Created new trunk.">[1]</a>
about the directory structure isse, I've made some changes as he
suggested. So, the patch that sould be used is this second version I'm
publishing in the issue tracker [2].</p><p><a class="changeset" href="http://trac.openlayers.org/changeset/1" title="Created new trunk.">[1]</a> <a class="ext-link" href="http://www.nabble.com/Patch-for-a-ka-Map-cached-layer-tp16623387p16623662.html"><span class="icon">http://www.nabble.com/Patch-for-a-ka-Map-cached-layer-tp16623387p16623662.html</span></a>
</p>
<blockquote>
</blockquote>
</div>[2] <a href="http://trac.openlayers.org/ticket/327">http://trac.openlayers.org/ticket/327</a><br><br>The patch for the KaMapCache layer with the proper modifications comes next.<br><br>My best regards,<br><br>Pedro Simonetti.<br>
<br><div><span class="gmail_quote">2008/4/10, Pedro Simonetti <<a href="mailto:pedrosimonetti@gmail.com">pedrosimonetti@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> Hi all,<br> <br> I'm doing an upgrade in the Veracidade project that was initially made over<br> ka-Map.<br> <a href="http://www.veracidade.com.br/">http://www.veracidade.com.br/</a><br> <br> Were upgrading the whole project. We're upgrading our imagery database and<br>
including new featues, so I felt a good step to migrate to OpenLayers,<br> giving the benefits OL offers to customization and user interaction.<br> <br> As every project, we have a limited schedule, but I hope this jorney will<br>
bring some goodies to the OL community, specially for those using OL+ka-Map.<br> <br> I've made some changes in the OL's ka-Map interface, and I would like to<br> share this with you all. I'll break those changes in different threads to<br>
make it easier to future research.<br> <br> So here we go. There is a problem in the "tile.php" file (named<br> "examples/kamap.txt") related to ka-Map overlays.<br> <a href="http://trac.openlayers.org/ticket/327">http://trac.openlayers.org/ticket/327</a><br>
<br> The solution is actually very simple. The code was missing to uppercase the<br> output format, so if you set your map in .js with "i" equals to "gif", the<br> code won't cacth this, and will use de default value from "tile.php"<br>
configuration section.<br> <br> I've break this file in two files "tile.php" and "config.php" to allow a<br> single configuration file be shared with both "tile.php" and "precache.php"<br>
(I'll discuss prepache changes in another thread).<br> <br> I'll posting a patch on the tracker for this issue.<br> <br> Here goes a suggestion. Since there will be 3 different php files related to<br> ka-Map, I think will be good, to create another directory for those files,<br>
maybe in "examples/kaMap", for example. I think also that is good to put<br> those files named "tile.php.txt", "config.php.txt", and "precache.php.txt",<br> to a better readibility.<br>
<br> This changes required a little change in KaMap.js, because the constant<br> "OpenLayers.Layer.KaMap.DEFAULT_PARAMS" souldn't be used, as the default<br> output format is taken from "config.php" file.<br>
<br> So, I'll post in the tracker a separated patch for this.<br> <br> Here a simple example of creating two ka-Map layers:<br> <br> // The output format used will be that informed at "config.php",<br> // since the parameter "i" was not used.<br>
var kamap_base = new OpenLayers.Layer.KaMap(<br> "Satellite",<br> "<a href="http://www.openlayers.org/world/tile.php">http://www.openlayers.org/world/tile.php</a>",<br> {g: "satellite", map: "world"}<br>
);<br> <br> // Create an ka-Map overlay layer (using "isBaseLayer: false"). Forces<br> // the output to be a "gif", using the "i" parameter.<br> var kamap_overlay = new OpenLayers.Layer.KaMap(<br>
"Streets",<br> "<a href="http://www.openlayers.org/world/tile.php">http://www.openlayers.org/world/tile.php</a>",<br> {g: "streets", map: "world", i: "gif"},<br>
{isBaseLayer: false}<br> );<br> <br> regards,<br> <br> Pedro Simonetti.<br> <br>--<br> View this message in context: <a href="http://www.nabble.com/Fix-for-issue--327%3A-ka-Map-overlays-tp16620073p16620073.html">http://www.nabble.com/Fix-for-issue--327%3A-ka-Map-overlays-tp16620073p16620073.html</a><br>
Sent from the OpenLayers Dev mailing list archive at Nabble.com.<br> <br> _______________________________________________<br> Dev mailing list<br> <a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br> <a href="http://openlayers.org/mailman/listinfo/dev">http://openlayers.org/mailman/listinfo/dev</a><br>
</blockquote></div><br>