<div dir="ltr">Thank you <span name="yvecai@gmail.com">yvecai that was the problem. Now it is working like a charm.</span></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 1, 2013 at 9:45 PM, <span dir="ltr"><<a href="mailto:yvecai@gmail.com" target="_blank">yvecai@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It may be that your server use TMS tile numbering instead of OSM/Google/.... so Y coordinate is upside-down.<br><br><font size="1"><span style="font-family:courier new,monospace">public final class TMSTileSource extends OnlineTileSourceBase {</span><br>
<span style="font-family:courier new,monospace"></span><br><span style="font-family:courier new,monospace"> public TMSTileSource(final String aName, final org.osmdroid.ResourceProxy.string aResourceId, final int aZoomMinLevel,</span><br>
<span style="font-family:courier new,monospace"> final int aZoomMaxLevel, final int aTileSizePixels, final String aImageFilenameEnding,</span><br><span style="font-family:courier new,monospace"> final String... aBaseUrl) {</span><br>
<span style="font-family:courier new,monospace"> super(aName, aResourceId, aZoomMinLevel, aZoomMaxLevel, aTileSizePixels,</span><br><span style="font-family:courier new,monospace"> aImageFilenameEnding, aBaseUrl);</span><br>
<span style="font-family:courier new,monospace"> }</span><br><span style="font-family:courier new,monospace"></span><br><span style="font-family:courier new,monospace"> @Override</span><br><span style="font-family:courier new,monospace"> public String getTileURLString(final MapTile aTile) {</span><br>
<span style="font-family:courier new,monospace"> int z = aTile.getZoomLevel();</span><br><span style="font-family:courier new,monospace"> int y = aTile.getY();</span><br><span style="font-family:courier new,monospace"> int x = aTile.getX();</span><br>
<span style="font-family:courier new,monospace"> int yy= (int) (Math.pow(2,z) -y-1);</span><br><span style="font-family:courier new,monospace"> return getBaseUrl() + z + "/" + x + "/" + yy</span><br>
<span style="font-family:courier new,monospace"> + mImageFilenameEnding;</span><br><span style="font-family:courier new,monospace"> }</span><br><span style="font-family:courier new,monospace">}</span></font><div class="im">
<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="font-family:courier new,monospace"></span></blockquote><br>On Saturday, June 1, 2013 3:12:47 PM UTC+2, Hishan Melanga wrote:</div>
<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div dir="ltr">The problem with this image is that the tiles are reversed from top to bottom. I meant that the tile that should be in the top is in the bottom. How can I fix this?</div>
</div><div class="im"><div><br><br><div class="gmail_quote">
On Sat, Jun 1, 2013 at 3:12 PM, Hishan Melanga <span dir="ltr"><<a>his...@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br clear="all">I have implemented a tiles server using Mapcache. I am retrieving tiles from that server using the following link,</div><font color="#2a00ff"><font color="#2a00ff"><div> </div><div><p>
<a href="http://192.168.1.5/mapcache/tms/1.0.0/ms-base@GoogleMapsCompatible/" target="_blank">http://192.168.1.5/mapcache/<u></u>tms/1.0.0/ms-base@<u></u>GoogleMapsCompatible/</a></p>
</div></font><div> </div></font><div>How ever when osmdroid mapview display the tiles it comes out of order. I attached an image for you to see. How can I get rid of this problem?<span><font color="#888888"><br>
-- <br><a href="http://hishanmelanga.blogspot.com/" target="_blank">හිෂාන් මෙලංග | Hishan Melanga</a><br>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://hishanmelanga.blogspot.com/" target="_blank">හිෂාන් මෙලංග | Hishan Melanga</a><br>
</div>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "osmdroid" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osmdroid%2Bunsubscribe@googlegroups.com" target="_blank">osmdroid+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><a href="http://hishanmelanga.blogspot.com/" target="_blank">හිෂාන් මෙලංග | Hishan Melanga</a><br>
</div>