printing custom basemap

3234
11
02-26-2013 01:25 AM
RaivoAlla
New Contributor II
Hello!

We have implemented esri.layers.TiledMapServiceLayer basemaps in our Javascript code (external TMS tiles) and now we are having a problem including such basemap into outprint.
Basemaps are added via map.addLayer interface and default printing service is declared this way:
[INDENT][INDENT]   var printer = new esri.dijit.Print({
     map: map,
     url: "http://atlas:6080/arcgis/rest/services/Raivotest/ExportWebMap/GPServer/Export%20Web%20Map"
   }, dojo.byId("b_print"));
   printer.startup();[/INDENT][/INDENT]

But, this output file contains only ArcGISDynamicMapServiceLayer layers . How I can include TiledMapServiceLayer?

It is a major problem here as those basemaps are for us very important.
Is ArcGIS a system or closed system?

Thank you,
Raivo Alla
Estonian Land Board
0 Kudos
11 Replies
deleted-user-Jie3eyjOl9XM
Occasional Contributor

I've been able to get the WebTiledLayer to work with the Print Task. The problem is that the TileInfo is not included in the webMapJson. So, you have to add a prerequest callback, and insert the TileInfo. See my code in this post:

WebTiledLayer and PrintTask working at 10.2?

0 Kudos
RaivoAlla
New Contributor II

Sorry for late feedback
Due to several problems I lost patience to do something useful for us with ArcGIS Javascript API. Mainly because too much struggle with custom projections... Switched to do some more basic stuff with application templates and we even updated our tiling technology (now it's MapCache) to produce WMTS tile layer (TMS ja not acceptable for Arcgis.com). Well, now the thing is that yes I can add our WMTS tile service to map easily, but still I don't get any sensible printout when pressing "Print" button. Tried even some other,non-Estonian, WMTS services, but still the same bug: WMTS basemap does not appear in printout!

Actually, this frustration does not end here, but I don't fall into that deep hole of problems we face dealing with ArcGIS Server or frontend development, at the moment. For us the most important things are our custom basemaps - yes, we don't use ArcGIS to produce them (thank God!) - that are projected in EPSG:3301. Because of diffent problems we can't serve our tiled basemaps in JSAPI-s Basemap Gallery and now, with that new printout bug - can't serve them at all.

I hope my criticism will be constrctive, I've send this bug to our local support. Atm, I don't have alternatives to use other solutions besides ArcGIS, so have mercy, Jackals.

0 Kudos