TMS (Tile Map Service) request change

372 views
Skip to first unread message

Giga Ace

unread,
Oct 22, 2015, 1:20:11 AM10/22/15
to cesium-dev
Hello, 

I was wondering if it is possible only by adding some properties to change request type of Tile Map Service.

By default it is something like this   URL / L / X / Y.png, but i want it to use GET parameters with layer name instead of pretty URLs 

something like this URL ? X = something & Y = something & Layer = something.

Any information or hint will be helpful. :)

Thanks.

Kevin Ring

unread,
Oct 22, 2015, 1:29:15 AM10/22/15
to cesiu...@googlegroups.com

Hi,

Have you looked at UrlTemplateImageryProvider?

Kevin

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giga Ace

unread,
Oct 23, 2015, 6:34:55 AM10/23/15
to cesium-dev
Thank you Kevin that was helpful btw could u help me with something else too, I'm trying to get tiles from server that is currently using EPSG:900913 coordinate system, which is not adding up correctly on cesium globe should I be converting coordinates while getting tiles or should I write in some of properties? And one more thing how can I get right coordinates on mouseClick event if I rotate camera by Z axis. Thank you.

Kevin Ring

unread,
Oct 25, 2015, 7:31:49 PM10/25/15
to cesiu...@googlegroups.com
EPSG:900913 is the same as the WebMercatorProjection in Cesium, so it should be supported.  What problem are you seeing?

Giga Ace

unread,
Oct 27, 2015, 1:33:50 AM10/27/15
to cesium-dev
I attached screenshots. And this is code

" var viewer = new Cesium.Viewer('cesiumContainer');
layers = viewer.scene.globe.imageryLayers;
var TMS= new Cesium.ImageryLayer(
new Cesium.UrlTemplateImageryProvider({
url : '/tms/1.0.0/google_streets_EPSG900913/{z}/{x}/{y}.png'
}));
layers.add(TMS);
Untitled.png
Untitled1.png

Giga Ace

unread,
Oct 27, 2015, 1:42:28 AM10/27/15
to cesium-dev
By the way I tried this code too,

var TMS= new Cesium.UrlTemplateImageryProvider({
      URL: 'tms/1.0.0/google_streets_EPSG900913/{z}/{x}/{reverseY}.png',
tilingScheme : new Cesium.GeographicTilingScheme(), });
and this too
var TMS= new Cesium.UrlTemplateImageryProvider({
      URL: 'tms/1.0.0/google_streets_EPSG900913/{z}/{x}/{reverseY}.png',
tilingScheme : new Cesium.WebMercatorTilingScheme(), });

Kevin Ring

unread,
Oct 27, 2015, 1:44:41 AM10/27/15
to cesiu...@googlegroups.com
The second attempt in your last email, with reverseY and WebMercatorTilingScheme, looks right to me.  What did that one look like?

Giga Ace

unread,
Oct 27, 2015, 10:57:20 AM10/27/15
to cesiu...@googlegroups.com
Actually I took these screenshots from that code the second one, anyway I changed it to geoserver to WMS requests and now it is working, thank you very much for help. By the way do u know anything about GeoserverTerrainProvider plugin?  I need to add custom terrain from geoserver to cesium they have given me WMS url. 

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/Z5Cy812Jh_M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

bobac...@gmail.com

unread,
Oct 27, 2015, 5:47:33 PM10/27/15
to cesium-dev
Le mardi 27 octobre 2015 15:57:20 UTC+1, Giga Ace a écrit :
> Actually I took these screenshots from that code the second one, anyway I changed it to geoserver to WMS requests and now it is working, thank you very much for help. By the way do u know anything about GeoserverTerrainProvider plugin?  I need to add custom terrain from geoserver to cesium they have given me WMS url. 
>
>
> On Tue, Oct 27, 2015 at 9:44 AM, Kevin Ring <ke...@kotachrome.com> wrote:
>
> The second attempt in your last email, with reverseY and WebMercatorTilingScheme, looks right to me.  What did that one look like?
>
>
>
>
> On Tue, Oct 27, 2015 at 4:42 PM, Giga Ace <kheb...@gmail.com> wrote:
>
>
>
> By the way I tried this code too,
>
>
> var TMS= new Cesium.UrlTemplateImageryProvider({
> URL: 'tms/1.0.0/google_streets_EPSG900913/{z}/{x}/{reverseY}.png',
> tilingScheme : new Cesium.GeographicTilingScheme(),
> });and this toovar TMS= new Cesium.UrlTemplateImageryProvider({
Hello I'm the author of geoserverTerrainProvider plugin.

Giga Ace

unread,
Oct 28, 2015, 8:13:04 AM10/28/15
to cesium-dev, bobac...@gmail.com


Hello I'm the author of geoserverTerrainProvider plugin.


Hello, I am trying to add terrain from geoserver, I have been given URL ( /geoserver/cite/wms), NAME of layer and XML url

 code: 

        

viewer = new Cesium.CesiumWidget('cesiumContainer');

var terrainProvider = new Cesium.GeoserverTerrainProvider({
            url : "/geoserver/cite/wms",
            xml: "/geoserver/ows?service=wms&version=1.1.0&request=GetCapabilities",
            layerName: "DEM_2014",
            formatImage: {format : "image/jpeg",extension: "jpeg"}
         });

viewer.terrainProvider = terrainProvider;

When I add terrainProvider  globe goes blank, no error no warning nothing comes up in console. I'm new in cesium and geoserver so I do not know what else configs should i have, is there something that I'm missing and what else params/options should I ask server admins to make sure I have everything to support my side.

 Thank you.

bobac...@gmail.com

unread,
Oct 28, 2015, 1:45:42 PM10/28/15
to cesium-dev, bobac...@gmail.com
For me, you should have
terrainProvider = new Cesium.GeoserverTerrainProvider({
url : 'http://localhost:8080/geoserver/ows',
layerName: 'cite:DEM_2014',
formatImage: {format : "image/jpeg",extension: "jpeg"}
});

the xml parameter isn't a string but DOM Document. You must have a real URL (/geoserver/cite/wms isn't an Uniform Resource Locator!).
If there is other issues could you send me your capabilities document?

Giga Ace

unread,
Oct 29, 2015, 4:19:03 AM10/29/15
to cesium-dev, bobac...@gmail.com
I attached screen. 

This is the layer at geoserver.  

CODE:

var terrainProvider = new Cesium.GeoserverTerrainProvider({
service: "WMS",
                url : "http://10.10.120.169:8080/geoserver/wms",
                layerName: 'cite:DEM_2014_1',
                formatImage: {format : "image/png",extension: "png"},
hasStyledImage: false
    });

RESULT: 

          When I add this terrain, app starts sending requests for tiles (I guess? no visual change. The default cesium layer re-renders), they come only once and app stops requesting them even after I change elevation level, no terrain is observable it is all flat. 
Untitled.png
Reply all
Reply to author
Forward
0 new messages