Skip to content

Commit

Permalink
Merge pull request #17 from snkashis/master
Browse files Browse the repository at this point in the history
Modify sample JSON files to conform to spec
  • Loading branch information
Jesse Eichar committed Jun 28, 2012
2 parents 5692c8e + 0bbc375 commit 4bd0762
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 174 deletions.
72 changes: 36 additions & 36 deletions samples/spec.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
layout: 'A4 portrait',
title: 'A simple example',
srs: 'EPSG:4326',
dpi: 254,
units: 'degrees',
outputFormat: 'png',
layers: [{
type: 'WMS',
layers: ['basic'],
baseURL: 'http://labs.metacarta.com/wms/vmap0',
format: 'image/jpeg'
"layout": "A4 portrait",
"title": "A simple example",
"srs": "EPSG:4326",
"dpi": 254,
"units": "degrees",
"outputFormat": "png",
"layers": [{
"type": "WMS",
"layers": ["basic"],
"baseURL": "http://labs.metacarta.com/wms/vmap0",
"format": "image/jpeg"
},
{
type: 'WMS',
layers: ['routes'],
baseURL: 'http://www.camptocamp.org/cgi-bin/mapserv_c2corg',
format: 'image/png'
"type": "WMS",
"layers": ["routes"],
"baseURL": "http://www.camptocamp.org/cgi-bin/mapserv_c2corg",
"format": "image/png"
}, {
"opacity": 0.5,
"customParams": {},
Expand Down Expand Up @@ -62,32 +62,32 @@
"name": "Cosmetic"
}
],
pages: [
"pages": [
{
center: [6, 45.5],
scale: 4000000,
mapTitle: "First map",
comment: "This is the first page selected by the user.",
rotation: 0,
data: {
data: [
{id:1, name: 'blah', icon: 'icon_pan', nameBackgroundColor: 'red', nameBorderColor: 'blue'},
{id:2, name: 'blip', icon: 'icon_zoomin', nameBackgroundColor: 'yellow', nameBorderColor: 'green'}
"center": [6, 45.5],
"scale": 4000000,
"mapTitle": "First map",
"comment": "This is the first page selected by the user.",
"rotation": 0,
"data": {
"data": [
{"id":1, "name": "blah", "icon": "icon_pan", "nameBackgroundColor": "red", "nameBorderColor": "blue"},
{"id":2, "name": "blip", "icon": "icon_zoomin", "nameBackgroundColor": "yellow", "nameBorderColor": "green"}
],
columns: ['id', 'name', 'icon']
"columns": ["id", "name", "icon"]
}
},{
center: [6, 45.5],
scale: 4000000,
mapTitle: "First map",
comment: "This is the first page selected by the user.",
rotation: 0,
data: {
data: [
{id:1, name: 'blah', icon: 'icon_pan', nameBackgroundColor: 'red', nameBorderColor: 'blue'},
{id:2, name: 'blip', icon: 'icon_zoomin', nameBackgroundColor: 'yellow', nameBorderColor: 'green'}
"center": [6, 45.5],
"scale": 4000000,
"mapTitle": "First map",
"comment": "This is the first page selected by the user.",
"rotation": 0,
"data": {
"data": [
{"id":1, "name": "blah", "icon": "icon_pan", "nameBackgroundColor": "red", "nameBorderColor": "blue"},
{"id":2, "name": "blip", "icon": "icon_zoomin", "nameBackgroundColor": "yellow", "nameBorderColor": "green"}
],
columns: ['id', 'name', 'icon']
"columns": ["id", "name", "icon"]
}
}
]
Expand Down
56 changes: 28 additions & 28 deletions samples/specGIF.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
layout: 'A4 portrait',
title: 'A simple example',
srs: 'EPSG:4326',
units: 'dd',
outputFilename: 'mapfish-print',
outputFormat: 'gif',
layers: [
"layout": "A4 portrait",
"title": "A simple example",
"srs": "EPSG:4326",
"units": "dd",
"outputFilename": "mapfish-print",
"outputFormat": "gif",
"layers": [
{
type: 'WMS',
format: 'image/png',
layers: ['basic'],
baseURL: 'http://labs.metacarta.com/wms/vmap0'
"type": "WMS",
"format": "image/png",
"layers": ["basic"],
"baseURL": "http://labs.metacarta.com/wms/vmap0"
}
],
pages: [
"pages": [
{
center: [6, 45.5],
scale: 4000000,
dpi: 190,
mapTitle: "First map",
comment: "The \"routes\" layer is not shown (the scale is too small)",
data: [
{id:1, name: 'blah', icon: 'icon_pan'},
{id:2, name: 'blip', icon: 'icon_zoomin'}
"center": [6, 45.5],
"scale": 4000000,
"dpi": 190,
"mapTitle": "First map",
"comment": "The 'routes' layer is not shown (the scale is too small)",
"data": [
{"id":1, "name": "blah", "icon": "icon_pan"},
{"id":2, "name": "blip", "icon": "icon_zoomin"}
]
},
{
center: [6.9, 46.2],
scale: 500000,
dpi: 190,
mapTitle: "Second map",
comment: "This is a zoomed in version of the first map. Since the scale is more appropriate, we show the \"routes\" layer.",
data: [
{id:1, name: 'blah', icon: 'icon_pan'},
{id:2, name: 'blip', icon: 'icon_zoomin'}
"center": [6.9, 46.2],
"scale": 500000,
"dpi": 190,
"mapTitle": "Second map",
"comment": "This is a zoomed in version of the first map. Since the scale is more appropriate, we show the 'routes' layer.",
"data": [
{"id":1, "name": "blah", "icon": "icon_pan"},
{"id":2, "name": "blip", "icon": "icon_zoomin"}
]
}
]
Expand Down
62 changes: 31 additions & 31 deletions samples/specNonPremiumGoogle.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
layout: 'A4 portrait',
title: 'Google Maps Print',
srs: 'EPSG:900913',
dpi: 254,
geodetic: true,
"layout": "A4 portrait",
"title": "Google Maps Print",
"srs": "EPSG:900913",
"dpi": 254,
"geodetic": true,

units: 'm',
layers: [
"units": "m",
"layers": [
{
baseURL: 'http://maps.google.com/maps/api/staticmap',
type : 'TiledGoogle',
maxExtent: [-20037508.3392,-20037508.3392,20037508.3392,20037508.3392],
tileSize: [256,256],
resolutions: [156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717],
extension : 'png',
format : 'png32',
sensor: 'false',
language: 'german',
markers: [
'color:blue|label:S|46.5195933305192,6.566684726913701'
"baseURL": "http://maps.google.com/maps/api/staticmap",
"type" : "TiledGoogle",
"maxExtent": [-20037508.3392,-20037508.3392,20037508.3392,20037508.3392],
"tileSize": [256,256],
"resolutions": [156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717],
"extension" : "png",
"format" : "png32",
"sensor": "false",
"language": "german",
"markers": [
"color:blue|label:S|46.5195933305192,6.566684726913701"
],
path: 'color:0x0000ff|weight:5|46.5095933305192,6.506684726913701|46.5195933305192,6.526684726913701|46.5395933305192,6.536684726913701|46.5695933305192,6.576684726913701',
maptype: 'street'
"path": "color:0x0000ff|weight:5|46.5095933305192,6.506684726913701|46.5195933305192,6.526684726913701|46.5395933305192,6.536684726913701|46.5695933305192,6.576684726913701",
"maptype": "street"
}
],
pages: [
"pages": [
{
center: [731000,5864000],
scale: 100000,
mapTitle: "Google Map",
comment: "This is the first page selected by the user.",
rotation: 0,
data: {
data: [
{id:1, name: 'blah', icon: 'icon_pan', nameBackgroundColor: 'red', nameBorderColor: 'blue'},
{id:2, name: 'blip', icon: 'icon_zoomin', nameBackgroundColor: 'yellow', nameBorderColor: 'green'}
"center": [731000,5864000],
"scale": 100000,
"mapTitle": "Google Map",
"comment": "This is the first page selected by the user.",
"rotation": 0,
"data": {
"data": [
{"id":1, "name": "blah", "icon": "icon_pan", "nameBackgroundColor": "red", "nameBorderColor": "blue"},
{"id":2, "name": "blip", "icon": "icon_zoomin", "nameBackgroundColor": "yellow", "nameBorderColor": "green"}
],
columns: ['id', 'name', 'icon']
"columns": ["id", "name", "icon"]
}
}
]
Expand Down
46 changes: 23 additions & 23 deletions samples/specOSM.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
layout: 'A4 portrait',
title: 'A simple example',
srs: 'EPSG:900913',
dpi: 190,
units: 'm',
layers: [
"layout": "A4 portrait",
"title": "A simple example",
"srs": "EPSG:900913",
"dpi": 190,
"units": "m",
"layers": [
{
baseURL: 'http://tile.openstreetmap.org/',
type : 'Osm',
maxExtent: [-20037508.3392,-20037508.3392,20037508.3392,20037508.3392],
tileSize: [256,256],
resolutions: [156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717],
extension : 'png'
"baseURL": "http://tile.openstreetmap.org/",
"type" : "Osm",
"maxExtent": [-20037508.3392,-20037508.3392,20037508.3392,20037508.3392],
"tileSize": [256,256],
"resolutions": [156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717],
"extension" : "png"
}
],
pages: [
"pages": [
{
center: [731000,5864000],
scale: 100000,
mapTitle: "OSM Map",
comment: "This is the first page selected by the user.",
rotation: 0,
data: {
data: [
{id:1, name: 'blah', icon: 'icon_pan', nameBackgroundColor: 'red', nameBorderColor: 'blue'},
{id:2, name: 'blip', icon: 'icon_zoomin', nameBackgroundColor: 'yellow', nameBorderColor: 'green'}
"center": [731000,5864000],
"scale": 100000,
"mapTitle": "OSM Map",
"comment": "This is the first page selected by the user.",
"rotation": 0,
"data": {
"data": [
{"id":1, "name": "blah", "icon": "icon_pan", "nameBackgroundColor": "red", "nameBorderColor": "blue"},
{"id":2, "name": "blip", "icon": "icon_zoomin", "nameBackgroundColor": "yellow", "nameBorderColor": "green"}
],
columns: ['id', 'name', 'icon']
"columns": ["id", "name", "icon"]
}
}
]
Expand Down
62 changes: 31 additions & 31 deletions samples/specPremiumGoogle.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
layout: 'A4 portrait',
title: 'Google Maps Print',
srs: 'EPSG:900913',
dpi: 254,
geodetic: true,
"layout": "A4 portrait",
"title": "Google Maps Print",
"srs": "EPSG:900913",
"dpi": 254,
"geodetic": true,

units: 'm',
layers: [
"units": "m",
"layers": [
{
baseURL: 'http://maps.google.com/maps/api/staticmap',
type : 'Google',
maxExtent: [-20037508.3392,-20037508.3392,20037508.3392,20037508.3392],
tileSize: [256,256],
resolutions: [156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717],
extension : 'png',
format : 'png32',
sensor: 'false',
language: 'german',
markers: [
'color:blue|label:S|46.5195933305192,6.566684726913701'
"baseURL": "http://maps.google.com/maps/api/staticmap",
"type" : "Google",
"maxExtent": [-20037508.3392,-20037508.3392,20037508.3392,20037508.3392],
"tileSize": [256,256],
"resolutions": [156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717],
"extension" : "png",
"format" : "png32",
"sensor": "false",
"language": "german",
"markers": [
"color:blue|label:S|46.5195933305192,6.566684726913701"
],
path: 'color:0x0000ff|weight:5|46.5095933305192,6.506684726913701|46.5195933305192,6.526684726913701|46.5395933305192,6.536684726913701|46.5695933305192,6.576684726913701',
maptype: 'street'
"path": "color:0x0000ff|weight:5|46.5095933305192,6.506684726913701|46.5195933305192,6.526684726913701|46.5395933305192,6.536684726913701|46.5695933305192,6.576684726913701",
"maptype": "street"
}
],
pages: [
"pages": [
{
center: [731000,5864000],
scale: 100000,
mapTitle: "Google Map",
comment: "This is the first page selected by the user.",
rotation: 0,
data: {
data: [
{id:1, name: 'blah', icon: 'icon_pan', nameBackgroundColor: 'red', nameBorderColor: 'blue'},
{id:2, name: 'blip', icon: 'icon_zoomin', nameBackgroundColor: 'yellow', nameBorderColor: 'green'}
"center": [731000,5864000],
"scale": 100000,
"mapTitle": "Google Map",
"comment": "This is the first page selected by the user.",
"rotation": 0,
"data": {
"data": [
{"id":1, "name": "blah", "icon": "icon_pan", "nameBackgroundColor": "red", "nameBorderColor": "blue"},
{"id":2, "name": "blip", "icon": "icon_zoomin", "nameBackgroundColor": "yellow", "nameBorderColor": "green"}
],
columns: ['id', 'name', 'icon']
"columns": ["id", "name", "icon"]
}
}
]
Expand Down
Loading

0 comments on commit 4bd0762

Please sign in to comment.