<div dir="ltr">Thanks! perhaps I'm trying the wrong way. I',m using vector-tile from geoserver and I get the same problem mentioned <a href="https://stackoverflow.com/a/34850171">here</a> so I try to use ol.source.Vector with ol.loadingstrategy.tile as loading strategy as follows.<br><div>.......................................................................................</div><div><font face="monospace, monospace">strategy: ol.loadingstrategy.tile(tileGrid),<br></font></div><div><font face="monospace, monospace">url: function(extent, resolution) {</font></div><div><font face="monospace, monospace"> var tileCoord = tileGrid.getTileCoordForCoordAndResolution(</font><span style="font-family:monospace,monospace">ol.extent.getCenter(extent), resolution);</span></div><div><font face="monospace, monospace"> var z = tileCoord[0];</font></div><div><font face="monospace, monospace"> var x = tileCoord[1];</font></div><div><font face="monospace, monospace"> var y = tileCoord[2];</font></div><div><b><font face="monospace, monospace"> var range = tileGrid.getFullTileRange(z);</font></b></div><div><font face="monospace, monospace"><b> y = range.getHeight() + tileCoord[2];// I need the range to transofrm 'Y' coordinate to fit in geoserver tile range.</b><br></font></div><div><font face="monospace, monospace"> return '/geoserver/gwc/service/tms/1.0.0/' +layer +'@EPSG%3A'+projection_epsg_no+'@geojson/'+z+'/'+ x+'/'+ y+'.geojson';</font></div><div><font face="monospace, monospace"> }<br></font><br></div><div>Is there any workaround?<br><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 7, 2017 at 12:46 PM, Olivier Guyot <span dir="ltr"><<a href="mailto:olivier.guyot@camptocamp.com" target="_blank">olivier.guyot@camptocamp.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">Hi,<br><br>This function is not part of the public API, hence the fact it is not exposed in Typescript definitions. You could still use it without errors by casting the ol.tilegrid.Tilegrid object to `any`, like so:<br><span style="font-family:arial,helvetica,sans-serif"><b>(tilegridObj as any).getFullTileRange()</b></span><br>Although that is obviously not the recommended way to go.<br><br>As for the execution error, Typescript would have nothing to do with that so there's probably a problem with how the tilegrid object is created.<br></div><div class="gmail_extra"><br clear="all"><div><div class="m_6267488855260380886gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span><font color="#888888"><div></div>-- <br><div><div dir="ltr"><div><b style="color:rgb(80,0,80);font-size:12.8000001907349px"><font size="6"><span style="color:rgb(141,141,148)">camp</span><font color="#f57d37">to</font><font color="#8d8d94">camp</font></font></b><span style="color:rgb(80,0,80);font-size:12.8000001907349px"></span><div style="color:rgb(80,0,80);font-size:12.8000001907349px"><font color="#8d8d94">INNOVATIVE SOLUTIONS</font></div><div style="color:rgb(80,0,80);font-size:12.8000001907349px"><font color="#8d8d94">BY OPEN SOURCE EXPERTS<br><br></font></div><font color="#8d8d94"><b>Olivier Guyot<br></b></font></div><div><font color="#8d8d94">Geospatial Developer<b><br></b></font></div><div><div style="color:rgb(80,0,80);font-size:12.8000001907349px"><font color="#8d8d94"><a href="tel:+33%204%2058%2048%2020%2028" value="+33458482028" target="_blank">+33 4 58 48 20 28</a></font></div></div></div></div></font></span></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Mon, Aug 7, 2017 at 4:49 PM, Ignacio Talavera <span dir="ltr"><<a href="mailto:ignacio.talavera@gmail.com" target="_blank">ignacio.talavera@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><span style="font-size:12.8px;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background-color:rgba(248,248,248,0.6)">I'm using Openlayers v4.2.0 with typescript so I installed the typesDefinition with npm install --save @types/openlayers </span><div style="font-size:12.8px"><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background-color:rgba(248,248,248,0.6)">I need to execute the method </span><b style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)">getFullTileRange()</b><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background-color:rgba(248,248,248,0.6)"> from ol.tilegrid.TileGrid type but is not defined in the type definition from @types/openlayers (index.d.ts).</span><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background-color:rgba(248,248,248,0.6)"><br></span></div><div style="font-size:12.8px"><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;background-color:rgba(248,248,248,0.6)">First I get a compilation error because getFullTileRange method is not declared in index.d.ts. I try to modify index.d.ts adding this method (inside my IDE to skip compilation errors) but running my app I get this exection error</span></div><div style="font-size:12.8px"><p style="color:rgb(36,39,41);font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;clear:both"><b>TypeError</b><span style="font-weight:inherit">: </span><b>tileGrid.getFullTileRange is not a function</b><span style="font-weight:inherit">.</span></p><p style="color:rgb(36,39,41);font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;clear:both">How can I extend index.d.ts to execute that function?</p><p style="color:rgb(36,39,41);font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;clear:both">Thanks!</p></div><div class="m_6267488855260380886m_-3306178439955860288gmail_signature"><div dir="ltr"><div><br><div><br></div></div></div></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/openlayers-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/openlayers-users</a><br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Ing Ignacio Talavera <div><span style="color:rgb(136,136,136)">Tel: </span><a value="+59899029766" style="color:rgb(17,85,204)">(+598) 99 993 382</a><br><div><br></div></div></div></div>
</div>