100 |
101 |
102 |
103 |
104 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/nls/pt-pt/template.js:
--------------------------------------------------------------------------------
1 | define({
2 | "viewer": {
3 | "main": {
4 | "scaleBarUnits": "metric",
5 | "clearSearch": "Limpar",
6 | "datePattern": "MMM d, yyyy"
7 | },
8 | "errors": {
9 | "createMap": "Não foi possível criar o mapa",
10 | "general": "Erro",
11 | "bingError": "A implementação desta aplicação requer uma chave Bing Maps própria.",
12 | "noLayers": "Nenhuma camada operacional",
13 | "noSearchResults": "Nenhum resultado encontrado.",
14 | "noGroupResults": "Não foi possível localizar o grupo.",
15 | "noMatches": "Não foi encontrado nenhum resultado correspondente.",
16 | "noMapsFound": "Não foi encontrado nenhum mapa."
17 | },
18 | "sidePanel": {
19 | "title": "Legenda",
20 | "legendButton": "Legenda",
21 | "layersButton": "Camadas",
22 | "legendButtonTitle": "Legenda do Mapa",
23 | "aboutButton": "Sobre",
24 | "aboutButtonTitle": "Sobre o Mapa",
25 | "message": "Nenhuma camada operacional"
26 | },
27 | "groupPage": {
28 | "showAllMaps": "Mostrar todos os mapas",
29 | "searchTitle": "Pesquisar neste grupo",
30 | "searchTitleShort": "Pesquisar",
31 | "searchPlaceholder": "Pesquisar mapas",
32 | "itemTitle": "Visualizar mapas",
33 | "gridSwitch": "Mudar para Visualização GRID",
34 | "listSwitch": "Mudar para Visualização de Lista",
35 | "loadingText": "A Carregar Mapas…"
36 | },
37 | "sortFields": {
38 | "sortBy": "Ordenar por",
39 | "modified": "Data",
40 | "title": "Título",
41 | "type": "Tipo",
42 | "numRatings": "Avaliações",
43 | "avgRating": "Avaliação Média",
44 | "numComments": "Comentários",
45 | "numViews": "Visualizações"
46 | },
47 | "comments": {
48 | "commentsHeader": "Comentários",
49 | "posted": "Publicado",
50 | "by": "Por",
51 | "deleteComment": "eliminar",
52 | "editComment": "editar",
53 | "noComments": "Sem comentários",
54 | "addCommentButton": "Adicionar Comentário",
55 | "signIn": "Iniciar sessão",
56 | "register": "Registar",
57 | "or": "ou",
58 | "toPost": "para publicar um comentário."
59 | },
60 | "buttons": {
61 | "cancel": "Cancelar",
62 | "submit": "Enviar"
63 | },
64 | "rating": {
65 | "signIn": "Iniciar sessão",
66 | "toRate": "para avaliar."
67 | },
68 | "itemInfo": {
69 | "createdLabel": "criado",
70 | "ratingsLabel": "avaliação",
71 | "ratingsLabelPlural": "avaliações",
72 | "viewsLabel": "visualização",
73 | "viewsLabelPlural": "visualizações",
74 | "commentsLabel": "comentário",
75 | "commentsLabelPlural": "comentários",
76 | "modifiedLabel": "Última Modificação",
77 | "by": "Por",
78 | "separator": ","
79 | },
80 | "mapPage": {
81 | "findLocation": "Encontrar um local",
82 | "findPlaceholder": "Localizar um endereço",
83 | "aboutHeader": "Sobre este mapa",
84 | "layersHeader": "Camadas",
85 | "enterFullscreen": "Visualizar em ecrã completo",
86 | "exitFullscreen": "Sair do modo ecrã completo",
87 | "arcgisLink": "Detalhes do Item",
88 | "moreInformation": "Mais Informações",
89 | "geoLocateTitle": "Utilizar Localização Atual",
90 | "openInMobile": "Abrir na Aplicação Móvel",
91 | "openInArcGIS": "Map Viewer",
92 | "openInExplorer": "Explorer Online",
93 | "ownerHeader": "Proprietário:",
94 | "switchBasemap": "Mudar Mapa Base",
95 | "getMobileApp": "Obter Aplicação",
96 | "constraintsHeading": "Utilize restrições",
97 | "createdLabel": "Criado",
98 | "noDescription": "Sem descrição.",
99 | "detailsLabel": "Detalhes"
100 | },
101 | "filterItems": {
102 | "show": "Mostrar",
103 | "all": "Todos os Resultados",
104 | "maps": "Mapas",
105 | "layers": "Camadas",
106 | "applications": "Aplicações",
107 | "tools": "Ferramentas",
108 | "files": "Ficheiros"
109 | },
110 | "pagination": {
111 | "previous": "Anterior",
112 | "next": "Seguinte",
113 | "first": "Primeira Página",
114 | "last": "Última Página",
115 | "helip": "…",
116 | "page": "Página"
117 | }
118 | }
119 | });
--------------------------------------------------------------------------------
/nls/fr/template.js:
--------------------------------------------------------------------------------
1 | define({
2 | "viewer": {
3 | "main": {
4 | "scaleBarUnits": "metric",
5 | "clearSearch": "Effacer",
6 | "datePattern": "d MMM, yyyy"
7 | },
8 | "errors": {
9 | "createMap": "Impossible de créer la carte",
10 | "general": "Erreur",
11 | "bingError": "Le déploiement de cette application nécessite votre propre clé Bing Maps.",
12 | "noLayers": "Aucune couche fonctionnelle",
13 | "noSearchResults": "Aucun résultat n'a été trouvé.",
14 | "noGroupResults": "Le groupe est introuvable.",
15 | "noMatches": "Aucun résultat n'a été trouvé.",
16 | "noMapsFound": "Aucune carte n'a été trouvée."
17 | },
18 | "sidePanel": {
19 | "title": "Légende",
20 | "legendButton": "Légende",
21 | "layersButton": "Couches",
22 | "legendButtonTitle": "Légende de la carte",
23 | "aboutButton": "A propos",
24 | "aboutButtonTitle": "A propos de la carte",
25 | "message": "Aucune couche fonctionnelle"
26 | },
27 | "groupPage": {
28 | "showAllMaps": "Afficher toutes les cartes",
29 | "searchTitle": "Rechercher dans ce groupe",
30 | "searchTitleShort": "Rechercher",
31 | "searchPlaceholder": "Rechercher dans les cartes",
32 | "itemTitle": "Afficher la carte",
33 | "gridSwitch": "Affichage Grille",
34 | "listSwitch": "Affichage Liste",
35 | "loadingText": "Chargement de Maps…"
36 | },
37 | "sortFields": {
38 | "sortBy": "Trier par",
39 | "modified": "Date",
40 | "title": "Titre",
41 | "type": "Type",
42 | "numRatings": "Evaluations",
43 | "avgRating": "Evaluation moyenne",
44 | "numComments": "Commentaires",
45 | "numViews": "Vues"
46 | },
47 | "comments": {
48 | "commentsHeader": "Commentaires",
49 | "posted": "Publié(s)",
50 | "by": "par",
51 | "deleteComment": "supprimer",
52 | "editComment": "modifier",
53 | "noComments": "Aucun commentaire",
54 | "addCommentButton": "Ajouter un commentaire",
55 | "signIn": "Se connecter",
56 | "register": "Enregistrement",
57 | "or": "ou",
58 | "toPost": "pour publier un commentaire."
59 | },
60 | "buttons": {
61 | "cancel": "Annuler",
62 | "submit": "Envoyer"
63 | },
64 | "rating": {
65 | "signIn": "Se connecter",
66 | "toRate": "pour laisser une évaluation."
67 | },
68 | "itemInfo": {
69 | "createdLabel": "créé(e)",
70 | "ratingsLabel": "évaluation",
71 | "ratingsLabelPlural": "évaluations",
72 | "viewsLabel": "vue",
73 | "viewsLabelPlural": "vues",
74 | "commentsLabel": "commentaire",
75 | "commentsLabelPlural": "commentaires",
76 | "modifiedLabel": "Dernière modification",
77 | "by": "par",
78 | "separator": ","
79 | },
80 | "mapPage": {
81 | "findLocation": "Rechercher un lieu",
82 | "findPlaceholder": "Localiser une adresse",
83 | "aboutHeader": "A propos de cette carte",
84 | "layersHeader": "Couches",
85 | "enterFullscreen": "Affichage plein écran",
86 | "exitFullscreen": "Quitter le plein écran",
87 | "arcgisLink": "Détails de l'élément",
88 | "moreInformation": "Plus d'informations",
89 | "geoLocateTitle": "Utiliser l'emplacement actuel",
90 | "openInMobile": "Ouvrir dans l'application mobile",
91 | "openInArcGIS": "Map Viewer",
92 | "openInExplorer": "Explorer Online",
93 | "ownerHeader": "Propriétaire :",
94 | "switchBasemap": "Changer de fond de carte",
95 | "getMobileApp": "Obtenir une application",
96 | "constraintsHeading": "Contraintes d'utilisation",
97 | "createdLabel": "Créé",
98 | "noDescription": "Aucune description.",
99 | "detailsLabel": "Détails"
100 | },
101 | "filterItems": {
102 | "show": "Afficher",
103 | "all": "Tous les résultats",
104 | "maps": "Cartes",
105 | "layers": "Couches",
106 | "applications": "Applications",
107 | "tools": "Outils",
108 | "files": "Fichiers"
109 | },
110 | "pagination": {
111 | "previous": "Précédent",
112 | "next": "Suivant",
113 | "first": "Première page",
114 | "last": "Dernière page",
115 | "helip": "…",
116 | "page": "Page"
117 | }
118 | }
119 | });
--------------------------------------------------------------------------------
/nls/ro/template.js:
--------------------------------------------------------------------------------
1 | define({
2 | "viewer": {
3 | "main": {
4 | "scaleBarUnits": "metric",
5 | "clearSearch": "Golire",
6 | "datePattern": "d. MMM yyyy"
7 | },
8 | "errors": {
9 | "createMap": "Nu se poate crea harta",
10 | "general": "Eroare",
11 | "bingError": "Lansarea acestei aplicaţii necesită propria dvs. cheie de hărţi Bing.",
12 | "noLayers": "Niciun strat tematic operaţional",
13 | "noSearchResults": "Ne pare rău, nu a fost găsit niciun rezultat.",
14 | "noGroupResults": "Grupul nu a putut fi găsit.",
15 | "noMatches": "Nu au fost găsite concordanţe.",
16 | "noMapsFound": "Nu a fost găsită nicio hartă."
17 | },
18 | "sidePanel": {
19 | "title": "Legendă",
20 | "legendButton": "Legendă",
21 | "layersButton": "Straturi tematice",
22 | "legendButtonTitle": "Legendă hartă",
23 | "aboutButton": "Despre",
24 | "aboutButtonTitle": "Despre hartă",
25 | "message": "Niciun strat tematic operaţional"
26 | },
27 | "groupPage": {
28 | "showAllMaps": "Afişare toate hărţile",
29 | "searchTitle": "Căutare acest grup",
30 | "searchTitleShort": "Căutare",
31 | "searchPlaceholder": "Căutare hărţi",
32 | "itemTitle": "Vizualizare hartă",
33 | "gridSwitch": "Comutare la Vizualizare grilă",
34 | "listSwitch": "Comutare la Vizualizare listă",
35 | "loadingText": "Încărcare hărţi…"
36 | },
37 | "sortFields": {
38 | "sortBy": "Sortare după",
39 | "modified": "Dată",
40 | "title": "Titlu",
41 | "type": "Tip",
42 | "numRatings": "Calificative",
43 | "avgRating": "Calificativ mediu",
44 | "numComments": "Comentarii",
45 | "numViews": "Vizualizări"
46 | },
47 | "comments": {
48 | "commentsHeader": "Comentarii",
49 | "posted": "Postat",
50 | "by": "de",
51 | "deleteComment": "ştergere",
52 | "editComment": "editare",
53 | "noComments": "Niciun comentariu",
54 | "addCommentButton": "Adăugare comentariu",
55 | "signIn": "Autentificare",
56 | "register": "Înregistrare",
57 | "or": "sau",
58 | "toPost": "pentru a posta un comentariu."
59 | },
60 | "buttons": {
61 | "cancel": "Anulare",
62 | "submit": "Trimitere"
63 | },
64 | "rating": {
65 | "signIn": "Autentificare",
66 | "toRate": "pentru a furniza un calificativ."
67 | },
68 | "itemInfo": {
69 | "createdLabel": "creat",
70 | "ratingsLabel": "calificativ",
71 | "ratingsLabelPlural": "calificative",
72 | "viewsLabel": "vizualizare",
73 | "viewsLabelPlural": "vizualizări",
74 | "commentsLabel": "comentariu",
75 | "commentsLabelPlural": "comentarii",
76 | "modifiedLabel": "Ultima modificare",
77 | "by": "de",
78 | "separator": ","
79 | },
80 | "mapPage": {
81 | "findLocation": "Găsire locaţie",
82 | "findPlaceholder": "Localizare adresă",
83 | "aboutHeader": "Despre această hartă",
84 | "layersHeader": "Straturi tematice",
85 | "enterFullscreen": "Vizualizare pe tot ecranul",
86 | "exitFullscreen": "Ieşire din Tot ecranul",
87 | "arcgisLink": "Detalii element",
88 | "moreInformation": "Informaţii suplimentare",
89 | "geoLocateTitle": "Utilizare locaţie curentă",
90 | "openInMobile": "Deschidere în aplicaţie mobilă",
91 | "openInArcGIS": "Map Viewer",
92 | "openInExplorer": "Explorer Online",
93 | "ownerHeader": "Proprietar:",
94 | "switchBasemap": "Schimbare hartă fundal",
95 | "getMobileApp": "Obţinere aplicaţie",
96 | "constraintsHeading": "Utilizare restricţii",
97 | "createdLabel": "Creat",
98 | "noDescription": "Nicio descriere.",
99 | "detailsLabel": "Detalii"
100 | },
101 | "filterItems": {
102 | "show": "Afişare",
103 | "all": "Toate rezultatele",
104 | "maps": "Hărţi",
105 | "layers": "Straturi tematice",
106 | "applications": "Aplicaţii",
107 | "tools": "Instrumente",
108 | "files": "Fişiere"
109 | },
110 | "pagination": {
111 | "previous": "Înapoi",
112 | "next": "Înainte",
113 | "first": "Prima pagină",
114 | "last": "Ultima pagină",
115 | "helip": "…",
116 | "page": "Pagina"
117 | }
118 | }
119 | });
--------------------------------------------------------------------------------
/nls/el/template.js:
--------------------------------------------------------------------------------
1 | define({
2 | "viewer": {
3 | "main": {
4 | "scaleBarUnits": "english",
5 | "clearSearch": "Απαλοιφή",
6 | "datePattern": "d MMM, yyyy"
7 | },
8 | "errors": {
9 | "createMap": "Δεν είναι δυνατή η δημιουργία χάρτη",
10 | "general": "Σφάλμα",
11 | "bingError": "Για την υλοποίηση αυτής της εφαρμογής απαιτείται να έχετε δικό σας κλειδί για τους Χάρτες Bing.",
12 | "noLayers": "Δεν υπάρχουν επιχειρησιακά επίπεδα",
13 | "noSearchResults": "Λυπούμαστε, δεν βρέθηκαν αποτελέσματα.",
14 | "noGroupResults": "Δεν ήταν δυνατή η εύρεση της ομάδας.",
15 | "noMatches": "Δεν βρέθηκαν αντιστοιχίσεις.",
16 | "noMapsFound": "Δεν βρέθηκαν χάρτες."
17 | },
18 | "sidePanel": {
19 | "title": "Υπόμνημα",
20 | "legendButton": "Υπόμνημα",
21 | "layersButton": "Θεματικά επίπεδα",
22 | "legendButtonTitle": "Υπόμνημα χάρτη",
23 | "aboutButton": "Πληροφορίες",
24 | "aboutButtonTitle": "Πληροφορίες για το χάρτη",
25 | "message": "Δεν υπάρχουν επιχειρησιακά επίπεδα"
26 | },
27 | "groupPage": {
28 | "showAllMaps": "Εμφάνιση όλων των χαρτών",
29 | "searchTitle": "Αναζήτηση σε αυτή την ομάδα",
30 | "searchTitleShort": "Αναζήτηση",
31 | "searchPlaceholder": "Αναζήτηση χαρτών",
32 | "itemTitle": "Προβολή χάρτη",
33 | "gridSwitch": "Μετάβαση στην προβολή πλέγματος",
34 | "listSwitch": "Μετάβαση στην προβολή λίστας",
35 | "loadingText": "Φόρτωση χαρτών…"
36 | },
37 | "sortFields": {
38 | "sortBy": "Ταξινόμηση κατά",
39 | "modified": "Ημερομηνία",
40 | "title": "Τίτλος",
41 | "type": "Τύπος",
42 | "numRatings": "Αξιολογήσεις",
43 | "avgRating": "Μέση αξιολόγηση",
44 | "numComments": "Σχόλια",
45 | "numViews": "Προβολές"
46 | },
47 | "comments": {
48 | "commentsHeader": "Σχόλια",
49 | "posted": "Δημοσίευση",
50 | "by": "από",
51 | "deleteComment": "διαγραφή",
52 | "editComment": "επεξεργασία",
53 | "noComments": "Δεν υπάρχουν σχόλια",
54 | "addCommentButton": "Προσθήκη σχολίου",
55 | "signIn": "Είσοδος",
56 | "register": "Εγγραφείτε",
57 | "or": "ή",
58 | "toPost": "για να δημοσιεύσετε ένα σχόλιο."
59 | },
60 | "buttons": {
61 | "cancel": "Άκυρο",
62 | "submit": "Υποβολή"
63 | },
64 | "rating": {
65 | "signIn": "Είσοδος",
66 | "toRate": "για να αξιολογήσετε."
67 | },
68 | "itemInfo": {
69 | "createdLabel": "δημιουργία",
70 | "ratingsLabel": "αξιολόγηση",
71 | "ratingsLabelPlural": "αξιολογήσεις",
72 | "viewsLabel": "προβολή",
73 | "viewsLabelPlural": "προβολές",
74 | "commentsLabel": "σχόλιο",
75 | "commentsLabelPlural": "σχόλια",
76 | "modifiedLabel": "Τελευταία τροποποίηση",
77 | "by": "από",
78 | "separator": ","
79 | },
80 | "mapPage": {
81 | "findLocation": "Βρείτε μια τοποθεσία",
82 | "findPlaceholder": "Εντοπίστε μια διεύθυνση",
83 | "aboutHeader": "Πληροφορίες για αυτόν το χάρτη",
84 | "layersHeader": "Θεματικά επίπεδα",
85 | "enterFullscreen": "Προβολή πλήρους οθόνης",
86 | "exitFullscreen": "Έξοδος από την πλήρη οθόνη",
87 | "arcgisLink": "Λεπτομέρειες αντικειμένου",
88 | "moreInformation": "Περισσότερες πληροφορίες",
89 | "geoLocateTitle": "Χρήση τρέχουσας τοποθεσίας",
90 | "openInMobile": "Άνοιγμα σε εφαρμογή για κινητά",
91 | "openInArcGIS": "Map Viewer",
92 | "openInExplorer": "Explorer Online",
93 | "ownerHeader": "Κάτοχος:",
94 | "switchBasemap": "Αλλαγή υποβάθρου",
95 | "getMobileApp": "Λήψη εφαρμογής",
96 | "constraintsHeading": "Χρήση περιορισμών",
97 | "createdLabel": "Δημιουργήθηκε",
98 | "noDescription": "Χωρίς περιγραφή.",
99 | "detailsLabel": "Λεπτομέρειες"
100 | },
101 | "filterItems": {
102 | "show": "Εμφάνιση",
103 | "all": "Όλα τα αποτελέσματα",
104 | "maps": "Χάρτες",
105 | "layers": "Θεματικά επίπεδα",
106 | "applications": "Εφαρμογές",
107 | "tools": "Εργαλεία",
108 | "files": "Αρχεία"
109 | },
110 | "pagination": {
111 | "previous": "Προηγούμενο",
112 | "next": "Επόμενο",
113 | "first": "Πρώτη σελίδα",
114 | "last": "Τελευταία σελίδα",
115 | "helip": "…",
116 | "page": "Σελίδα"
117 | }
118 | }
119 | });
--------------------------------------------------------------------------------
/nls/en/template.js:
--------------------------------------------------------------------------------
1 | define(
2 | ({
3 | "viewer": {
4 | "main": {
5 | "scaleBarUnits": "english",
6 | "clearSearch": "Clear",
7 | "datePattern": "MMM d, yyyy" // added 2.5.2013
8 | },
9 | "errors": {
10 | "createMap": "Unable to create map",
11 | "general": "Error",
12 | "bingError": "Deploying this application requires your own Bing Maps key.",
13 | "noLayers": "No operational layers",
14 | "noSearchResults": "Sorry, no results were found.",
15 | "noGroupResults": "The group could not be found.",
16 | "noMatches": "No matches found.",
17 | "noMapsFound": "No maps were found."
18 | },
19 | "sidePanel": {
20 | "title": "Legend",
21 | "legendButton": "Legend",
22 | "layersButton": "Layers", // new
23 | "legendButtonTitle": "Map Legend",
24 | "aboutButton": "About",
25 | "aboutButtonTitle": "About Map",
26 | "message": "No operational layers"
27 | },
28 | "groupPage": {
29 | "showAllMaps": "Show all maps",
30 | "searchTitle": "Search this group",
31 | "searchTitleShort": "Search",
32 | "searchPlaceholder": "Search maps",
33 | "itemTitle": "View map",
34 | "gridSwitch": "Switch to Grid View",
35 | "listSwitch": "Switch to List View",
36 | "loadingText": "Loading Maps…"
37 | },
38 | "sortFields":{
39 | "sortBy": "Sort by",
40 | "modified": "Date",
41 | "title": "Title",
42 | "type": "Type",
43 | "numRatings": "Ratings",
44 | "avgRating": "Avg. Rating",
45 | "numComments": "Comments",
46 | "numViews": "Views"
47 | },
48 | "comments":{
49 | "commentsHeader": "Comments",
50 | "posted": "Posted",
51 | "by": "by",
52 | "deleteComment": "delete",
53 | "editComment": "edit",
54 | "noComments": "No comments",
55 | "addCommentButton": "Add Comment",
56 | "signIn": "Sign In",
57 | "register": "Register",
58 | "or": "or",
59 | "toPost": "to post a comment."
60 | },
61 | "buttons":{
62 | "cancel": "Cancel",
63 | "submit": "Submit"
64 | },
65 | "rating":{
66 | "signIn": "Sign In",
67 | "toRate": "to rate."
68 | },
69 | "itemInfo":{
70 | "createdLabel": "created",
71 | "ratingsLabel": "rating",
72 | "ratingsLabelPlural": "ratings",
73 | "viewsLabel": "view",
74 | "viewsLabelPlural": "views",
75 | "commentsLabel": "comment",
76 | "commentsLabelPlural": "comments",
77 | "modifiedLabel": "Last Modified",
78 | "by": "by",
79 | "separator": ","
80 | },
81 | "mapPage": {
82 | "findLocation": "Find a location",
83 | "findPlaceholder": "Locate an address",
84 | "aboutHeader": "About this map",
85 | "layersHeader": "Layers",
86 | "enterFullscreen": "Fullscreen View",
87 | "exitFullscreen": "Exit Fullscreen",
88 | "arcgisLink": "Item Details",
89 | "moreInformation": "More Information",
90 | "geoLocateTitle": "Use Current Location",
91 | "openInMobile": "Open in Mobile App",
92 | "openInArcGIS": "Map Viewer",
93 | "openInExplorer": "Explorer Online",
94 | "ownerHeader": "Owner:",
95 | "switchBasemap": "Switch Basemap",
96 | "getMobileApp": "Get App",
97 | "constraintsHeading":"Use Constraints",
98 | "createdLabel":"Created",
99 | "noDescription":"No description.",
100 | "detailsLabel":"Details"
101 | },
102 | "filterItems":{
103 | "show": "Show",
104 | "all": "All Results",
105 | "maps": "Maps",
106 | "layers": "Layers",
107 | "applications": "Applications",
108 | "tools": "Tools",
109 | "files": "Files"
110 | },
111 | "pagination": {
112 | "previous": "Previous",
113 | "next": "Next",
114 | "first": "First Page",
115 | "last": "Last Page",
116 | "helip": "…",
117 | "page": "Page"
118 | }
119 | }
120 | })
121 | );
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # map-gallery-template-js
2 |
3 | This PublicGallery template is designed for anyone who wants to showcase their ArcGIS Online maps, layers, and mobile apps in a dynamic gallery. [more info](http://www.arcgis.com/home/item.html?id=34505d89a3b34be09b65b98938974390).
4 |
5 | [View it live](http://www.arcgis.com/apps/PublicGallery/index.html)
6 |
7 | 
8 |
9 | ## Features
10 | The Public Maps Gallery (PMG) template is designed for anyone who wants to showcase their ArcGIS Online maps, layers, and mobile apps in a dynamic web gallery. The template allows you to control the content that fills the gallery using tools available in your ArcGIS Online account. This means that once you deploy a gallery, keeping gallery content up-to-date is as simple as sharing or un-sharing items in your ArcGIS Online group.
11 | The PMG template is also easily configurable. A complete list of features and enhancements is included with the template as is a quick start guide.
12 |
13 | ## Instructions
14 |
15 | 1. Download and unzip the .zip file or clone the repo.
16 | 2. Web-enable the directory.
17 | 3. Access the .html page.
18 | 4. See the readme.html page for configuration options.
19 |
20 | [New to Github? Get started here.](https://github.com/)
21 |
22 | ## Deploying
23 |
24 | 1. To deploy this application, download the template from Portal/ArcGIS Online and unzip it.
25 | 2. Copy the unzipped folder containing the web app template files, such as index.html, to your web server. You can rename the folder to change the URL through which users will access the application. By default the URL to the app will be `http:////index.html`
26 | 3. Change the sharing host, found in options.js inside the config folder for the application, to the sharing URL for ArcGIS Online or Portal. For ArcGIS Online users, keep the default value of www.arcgis.com or specify the name of your organization.
27 | - ArcGIS Online Example: `"sharingurl": "https://" + “.maps.arcgis.com`
28 | - Portal Example where `arcgis` is the name of the Web Adaptor: `"sharingurl": "https://" + "webadaptor.domain.com/arcgis"`
29 | 4. If you are using Portal or a local install of the ArcGIS API for JavaScript, change all references to the ArcGIS API for JavaScript in index.html to refer to your local copy of the API. Search for the references containing `"https://js.arcgis.com/3.22"` and replace this portion of the reference with the url to your local install.
30 | - For example: `"https://webadaptor.domain.com/arcgis/jsapi/jsapi"` where `arcgis` is the name of your Web Adaptor.
31 | 5. Copy a map or group ID from Portal/ArcGIS Online and replace the default web map ID in the application’s index.html page. You can now run the application on your web server or customize the application further.
32 |
33 | > **Note:** If your application edits features in a feature service, contains secure services or web maps that aren't shared publicly, or generate requests that exceed 200 characters, you may need to set up and use a proxy page. Common situations where you may exceed the URL length are using complex polygons as input to a task or specifying a spatial reference using well-known text (WKT). For details on installing and configuring a proxy page see [Using the proxy](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html). If you do not have an Internet connection, you will need to access and deploy the ArcGIS API for JavaScript documentation from [developers.arcgis.com](https://developers.arcgis.com/).
34 |
35 | [New to Github? Get started here.](https://github.com/)
36 |
37 | ## Requirements
38 |
39 | * Notepad or HTML editor
40 | * A little background with Javascript
41 | * Experience with the [ArcGIS Javascript API](http://www.esri.com/) would help.
42 |
43 | ## Resources
44 |
45 | * [ArcGIS for JavaScript API Resource Center](http://help.arcgis.com/en/webapi/javascript/arcgis/index.html)
46 | * [ArcGIS Blog](http://blogs.esri.com/esri/arcgis/)
47 | * [twitter@esri](http://twitter.com/esri)
48 |
49 | ## Issues
50 |
51 | Find a bug or want to request a new feature? Please let us know by submitting an issue.
52 |
53 | ## Contributing
54 |
55 | Anyone and everyone is welcome to contribute.
56 |
57 | ## Licensing
58 | Copyright 2012 Esri
59 |
60 | Licensed under the Apache License, Version 2.0 (the "License");
61 | you may not use this file except in compliance with the License.
62 | You may obtain a copy of the License at
63 |
64 | http://www.apache.org/licenses/LICENSE-2.0
65 |
66 | Unless required by applicable law or agreed to in writing, software
67 | distributed under the License is distributed on an "AS IS" BASIS,
68 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
69 | See the License for the specific language governing permissions and
70 | limitations under the License.
71 |
72 | A copy of the license is available in the repository's [license.txt](https://raw.github.com/Esri/map-gallery-template-js/master/license.txt) file.
73 |
--------------------------------------------------------------------------------
/nls/template.js:
--------------------------------------------------------------------------------
1 | define({
2 | root: ({
3 | "viewer": {
4 | "main": {
5 | "scaleBarUnits": "english",
6 | "clearSearch": "Clear",
7 | "datePattern": "MMM d, yyyy" // added 2.5.2013
8 | },
9 | "errors": {
10 | "createMap": "Unable to create map",
11 | "general": "Error",
12 | "bingError": "Deploying this application requires your own Bing Maps key.",
13 | "noLayers": "No operational layers",
14 | "noSearchResults": "Sorry, no results were found.",
15 | "noGroupResults": "The group could not be found.",
16 | "noMatches": "No matches found.",
17 | "noMapsFound": "No maps were found."
18 | },
19 | "sidePanel": {
20 | "title": "Legend",
21 | "legendButton": "Legend",
22 | "layersButton": "Layers", // new
23 | "legendButtonTitle": "Map Legend",
24 | "aboutButton": "About",
25 | "aboutButtonTitle": "About Map",
26 | "message": "No operational layers"
27 | },
28 | "groupPage": {
29 | "showAllMaps": "Show all maps",
30 | "searchTitle": "Search this group",
31 | "searchTitleShort": "Search",
32 | "searchPlaceholder": "Search maps",
33 | "itemTitle": "View map",
34 | "gridSwitch": "Switch to Grid View",
35 | "listSwitch": "Switch to List View",
36 | "loadingText": "Loading Maps…"
37 | },
38 | "sortFields": {
39 | "sortBy": "Sort by",
40 | "modified": "Date",
41 | "title": "Title",
42 | "type": "Type",
43 | "numRatings": "Ratings",
44 | "avgRating": "Avg. Rating",
45 | "numComments": "Comments",
46 | "numViews": "Views"
47 | },
48 | "comments": {
49 | "commentsHeader": "Comments",
50 | "posted": "Posted",
51 | "by": "by",
52 | "deleteComment": "delete",
53 | "editComment": "edit",
54 | "noComments": "No comments",
55 | "addCommentButton": "Add Comment",
56 | "signIn": "Sign In",
57 | "register": "Register",
58 | "or": "or",
59 | "toPost": "to post a comment."
60 | },
61 | "buttons": {
62 | "cancel": "Cancel",
63 | "submit": "Submit"
64 | },
65 | "rating": {
66 | "signIn": "Sign In",
67 | "toRate": "to rate."
68 | },
69 | "itemInfo": {
70 | "createdLabel": "created",
71 | "ratingsLabel": "rating",
72 | "ratingsLabelPlural": "ratings",
73 | "viewsLabel": "view",
74 | "viewsLabelPlural": "views",
75 | "commentsLabel": "comment",
76 | "commentsLabelPlural": "comments",
77 | "modifiedLabel": "Last Modified",
78 | "by": "by",
79 | "separator": ","
80 | },
81 | "mapPage": {
82 | "findLocation": "Find a location",
83 | "findPlaceholder": "Locate an address",
84 | "aboutHeader": "About this map",
85 | "layersHeader": "Layers",
86 | "enterFullscreen": "Fullscreen View",
87 | "exitFullscreen": "Exit Fullscreen",
88 | "arcgisLink": "Item Details",
89 | "moreInformation": "More Information",
90 | "geoLocateTitle": "Use Current Location",
91 | "openInMobile": "Open in Mobile App",
92 | "openInArcGIS": "Map Viewer",
93 | "openInExplorer": "Explorer Online",
94 | "ownerHeader": "Owner:",
95 | "switchBasemap": "Switch Basemap",
96 | "getMobileApp": "Get App",
97 | "constraintsHeading": "Use Constraints",
98 | "createdLabel": "Created",
99 | "noDescription": "No description.",
100 | "detailsLabel": "Details"
101 | },
102 | "filterItems": {
103 | "show": "Show",
104 | "all": "All Results",
105 | "maps": "Maps",
106 | "layers": "Layers",
107 | "applications": "Applications",
108 | "tools": "Tools",
109 | "files": "Files"
110 | },
111 | "pagination": {
112 | "previous": "Previous",
113 | "next": "Next",
114 | "first": "First Page",
115 | "last": "Last Page",
116 | "helip": "…",
117 | "page": "Page"
118 | }
119 | }
120 | }),
121 | "ar": 1,
122 | "bs": 1,
123 | "cs": 1,
124 | "da": 1,
125 | "de": 1,
126 | "el": 1,
127 | "es": 1,
128 | "et": 1,
129 | "fi": 1,
130 | "fr": 1,
131 | "he": 1,
132 | "hi": 1,
133 | "hr": 1,
134 | "id": 1,
135 | "it": 1,
136 | "ja": 1,
137 | "ko": 1,
138 | "lt": 1,
139 | "lv": 1,
140 | "nl": 1,
141 | "nb": 1,
142 | "pl": 1,
143 | "pt-br": 1,
144 | "pt-pt": 1,
145 | "ro": 1,
146 | "ru": 1,
147 | "sr": 1,
148 | "sv": 1,
149 | "th": 1,
150 | "tr": 1,
151 | "vi": 1,
152 | "zh-cn": 1,
153 | "zh-hk": 1,
154 | "zh-tw": 1
155 | });
--------------------------------------------------------------------------------
/hr/template.js:
--------------------------------------------------------------------------------
1 | define({
2 | root: ({
3 | "viewer": {
4 | "main": {
5 | "scaleBarUnits": "Č_english___ž",
6 | "clearSearch": "Č_Clear___ž",
7 | "datePattern": "Č_MMM d, yyyy____ž" // added 2.5.2013
8 | },
9 | "errors": {
10 | "createMap": "Č_Unable to create map_______ž",
11 | "general": "Č_Error___ž",
12 | "bingError": "Č_Deploying this application requires your own Bing Maps key___________________ž.",
13 | "noLayers": "Č_No operational layers_______ž",
14 | "noSearchResults": "Č_Sorry, no results were found__________ž.",
15 | "noGroupResults": "Č_The group could not be found__________ž.",
16 | "noMatches": "Č_No matches found______ž.",
17 | "noMapsFound": "Č_No maps were found_______ž."
18 | },
19 | "sidePanel": {
20 | "title": "Č_Legend___ž",
21 | "legendButton": "Č_Legend___ž",
22 | "layersButton": "Č_Layers___ž", // new
23 | "legendButtonTitle": "Č_Map Legend____ž",
24 | "aboutButton": "Č_About___ž",
25 | "aboutButtonTitle": "Č_About Map____ž",
26 | "message": "Č_No operational layers_______ž"
27 | },
28 | "groupPage": {
29 | "showAllMaps": "Č_Show all maps_____ž",
30 | "searchTitle": "Č_Search this group______ž",
31 | "searchTitleShort": "Č_Search___ž",
32 | "searchPlaceholder": "Č_Search maps____ž",
33 | "itemTitle": "Č_View map___ž",
34 | "gridSwitch": "Č_Switch to Grid View_______ž",
35 | "listSwitch": "Č_Switch to List View_______ž",
36 | "loadingText": "Č_Loading Maps…_______ž"
37 | },
38 | "sortFields": {
39 | "sortBy": "Č_Sort by___ž",
40 | "modified": "Č_Date__ž",
41 | "title": "Č_Title___ž",
42 | "type": "Č_Type__ž",
43 | "numRatings": "Č_Ratings___ž",
44 | "avgRating": "Č_Avg. Rating____ž",
45 | "numComments": "Č_Comments___ž",
46 | "numViews": "Č_Views___ž"
47 | },
48 | "comments": {
49 | "commentsHeader": "Č_Comments___ž",
50 | "posted": "Č_Posted___ž",
51 | "by": "Č_by__ž",
52 | "deleteComment": "Č_delete___ž",
53 | "editComment": "Č_edit__ž",
54 | "noComments": "Č_No comments____ž",
55 | "addCommentButton": "Č_Add Comment____ž",
56 | "signIn": "Č_Sign In___ž",
57 | "register": "Č_Register___ž",
58 | "or": "Č_or__ž",
59 | "toPost": "Č_to post a comment______ž."
60 | },
61 | "buttons": {
62 | "cancel": "Č_Cancel___ž",
63 | "submit": "Č_Submit___ž"
64 | },
65 | "rating": {
66 | "signIn": "Č_Sign In___ž",
67 | "toRate": "Č_to rate___ž."
68 | },
69 | "itemInfo": {
70 | "createdLabel": "Č_created___ž",
71 | "ratingsLabel": "Č_rating___ž",
72 | "ratingsLabelPlural": "Č_ratings___ž",
73 | "viewsLabel": "Č_view__ž",
74 | "viewsLabelPlural": "Č_views___ž",
75 | "commentsLabel": "Č_comment___ž",
76 | "commentsLabelPlural": "Č_comments___ž",
77 | "modifiedLabel": "Č_Last Modified_____ž",
78 | "by": "Č_by__ž",
79 | "separator": "Č__ž,"
80 | },
81 | "mapPage": {
82 | "findLocation": "Č_Find a location______ž",
83 | "findPlaceholder": "Č_Locate an address______ž",
84 | "aboutHeader": "Č_About this map_____ž",
85 | "layersHeader": "Č_Layers___ž",
86 | "enterFullscreen": "Č_Fullscreen View______ž",
87 | "exitFullscreen": "Č_Exit Fullscreen______ž",
88 | "arcgisLink": "Č_Item Details_____ž",
89 | "moreInformation": "Č_More Information______ž",
90 | "geoLocateTitle": "Č_Use Current Location_______ž",
91 | "openInMobile": "Č_Open in Mobile App______ž",
92 | "openInArcGIS": "Map Viewer",
93 | "openInExplorer": "Explorer Online",
94 | "ownerHeader": "Č_Owner___ž:",
95 | "switchBasemap": "Č_Switch Basemap_____ž",
96 | "getMobileApp": "Č_Get App___ž",
97 | "constraintsHeading": "Č_Use Constraints______ž",
98 | "createdLabel": "Č_Created___ž",
99 | "noDescription": "Č_No description______ž.",
100 | "detailsLabel": "Č_Details___ž"
101 | },
102 | "filterItems": {
103 | "show": "Č_Show__ž",
104 | "all": "Č_All Results____ž",
105 | "maps": "Č_Maps__ž",
106 | "layers": "Č_Layers___ž",
107 | "applications": "Č_Applications_____ž",
108 | "tools": "Č_Tools___ž",
109 | "files": "Č_Files___ž"
110 | },
111 | "pagination": {
112 | "previous": "Č_Previous___ž",
113 | "next": "Č_Next__ž",
114 | "first": "Č_First Page____ž",
115 | "last": "Č_Last Page____ž",
116 | "helip": "…",
117 | "page": "Č_Page__ž"
118 | }
119 | }
120 | }),
121 | "ar": 1,
122 | "cs": 1,
123 | "da": 1,
124 | "de": 1,
125 | "el": 1,
126 | "es": 1,
127 | "et": 1,
128 | "fi": 1,
129 | "fr": 1,
130 | "he": 1,
131 | "hr": 1,
132 | "it": 1,
133 | "ja": 1,
134 | "ko": 1,
135 | "lt": 1,
136 | "lv": 1,
137 | "nl": 1,
138 | "nb": 1,
139 | "pl": 1,
140 | "pt-br": 1,
141 | "pt-pt": 1,
142 | "ro": 1,
143 | "ru": 1,
144 | "sr": 1,
145 | "sv": 1,
146 | "th": 1,
147 | "tr": 1,
148 | "vi": 1,
149 | "zh-cn": 1,
150 | "zh-hk": 1,
151 | "zh-tw": 1
152 | });
--------------------------------------------------------------------------------
/proxy/proxy.php:
--------------------------------------------------------------------------------
1 | ?
5 | * [2] http://? (with POST body)
6 | * [3] http://??token=ABCDEFGH
7 | *
8 | * note: [3] is used when fetching tiles from a secured service and the
9 | * JavaScript app sends the token instead of being set in this proxy
10 | *
11 | * REQUIREMENTS
12 | * - cURL extension for PHP must be installed and loaded. To load it,
13 | * add the following lines to your php.ini file:
14 | * extension_dir = "/ext"
15 | * extension = php_curl.dll
16 | *
17 | * - Turn OFF magic quotes for incoming GET/POST data: add/modify the
18 | * following line to your php.ini file:
19 | * magic_quotes_gpc = Off
20 | *
21 | ***************************************************************************/
22 |
23 | /***************************************************************************
24 | * to only proxy to the sites listed in '$serverUrls'
25 | * to proxy to any site (are you sure you want to do this?)
26 | */
27 | $mustMatch = true;
28 |
29 | /***************************************************************************
30 | * ArcGIS Server services this proxy will forward requests to
31 | *
32 | * 'url' = location of the ArcGIS Server, either specific URL or stem
33 | * 'matchAll' = to forward any request beginning with the URL
34 | * to forward only the request that exactly matches the url
35 | * 'token' = token to include for secured service, if any, otherwise leave it
36 | * empty
37 | */
38 | $serverUrls = array(
39 | array( 'url' => 'http://localhost/', 'matchAll' => true, 'token' => '' ),
40 | array( 'url' => 'https://localhost/', 'matchAll' => true, 'token' => '' ),
41 | array( 'url' => 'https://test.com/', 'matchAll' => true, 'token' => '' ),
42 | array( 'url' => 'http://test.com/', 'matchAll' => true, 'token' => '' ),
43 | array( 'url' => 'http://servicesbeta.esri.com/', 'matchAll' => true, 'token' => '' ),
44 | array( 'url' => 'https://servicesbeta.esri.com/', 'matchAll' => true, 'token' => '' ),
45 | array( 'url' => 'https://www.arcgis.com/sharing/', 'matchAll' => true, 'token' => '' ),
46 | array( 'url' => 'http://www.arcgis.com/sharing/', 'matchAll' => true, 'token' => '' ),
47 | array( 'url' => 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/', 'matchAll' => true, 'token' => '' ),
48 | array( 'url' => 'http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/', 'matchAll' => true, 'token' => '' ),
49 | array( 'url' => 'http://sampleserver1a.arcgisonline.com/arcgisoutput/', 'matchAll' => true, 'token' => '' ),
50 | array( 'url' => 'http://sampleserver1b.arcgisonline.com/arcgisoutput/', 'matchAll' => true, 'token' => '' ),
51 | array( 'url' => 'http://sampleserver1c.arcgisonline.com/arcgisoutput/', 'matchAll' => true, 'token' => '' )
52 | );
53 | /***************************************************************************/
54 |
55 | function is_url_allowed($allowedServers, $url) {
56 | $isOk = false;
57 | $url = trim($url, "\/");
58 | for ($i = 0, $len = count($allowedServers); $i < $len; $i++) {
59 | $value = $allowedServers[$i];
60 | $allowedUrl = trim($value['url'], "\/");
61 | if ($value['matchAll']) {
62 | if (stripos($url, $allowedUrl) === 0) {
63 | $isOk = $i; // array index that matched
64 | break;
65 | }
66 | }
67 | else {
68 | if ((strcasecmp($url, $allowedUrl) == 0)) {
69 | $isOk = $i; // array index that matched
70 | break;
71 | }
72 | }
73 | }
74 | return $isOk;
75 | }
76 |
77 | // check if the curl extension is loaded
78 | if (!extension_loaded("curl")) {
79 | header('Status: 500', true, 500);
80 | echo 'cURL extension for PHP is not loaded! Add the following lines to your php.ini file: extension_dir = "<your-php-install-location>/ext" extension = php_curl.dll';
81 | return;
82 | }
83 |
84 | $targetUrl = $_SERVER['QUERY_STRING'];
85 | if (!$targetUrl) {
86 | header('Status: 400', true, 400); // Bad Request
87 | echo 'Target URL is not specified! Usage: http://<this-proxy-url>?<target-url>';
88 | return;
89 | }
90 |
91 | $parts = preg_split("/\?/", $targetUrl);
92 | $targetPath = $parts[0];
93 |
94 | // check if the request URL matches any of the allowed URLs
95 | if ($mustMatch) {
96 | $pos = is_url_allowed($serverUrls, $targetPath);
97 | if ($pos === false) {
98 | header('Status: 403', true, 403); // Forbidden
99 | echo 'Target URL is not allowed! Consult the documentation for this proxy to add the target URL to its Whitelist.';
100 | return;
101 | }
102 | }
103 |
104 | // add token (if any) to the url
105 | $token = $serverUrls[$pos]['token'];
106 | if ($token) {
107 | $targetUrl .= (stripos($targetUrl, "?") !== false ? '&' : '?').'token='.$token;
108 | }
109 |
110 | // open the curl session
111 | $session = curl_init();
112 |
113 | // set the appropriate options for this request
114 | $options = array(
115 | CURLOPT_URL => $targetUrl,
116 | CURLOPT_HEADER => false,
117 | CURLOPT_HTTPHEADER => array(
118 | 'Content-Type: ' . $_SERVER['CONTENT_TYPE'],
119 | 'Referer: ' . $_SERVER['HTTP_REFERER']
120 | ),
121 | CURLOPT_RETURNTRANSFER => true,
122 | CURLOPT_FOLLOWLOCATION => true
123 | );
124 |
125 | // put the POST data in the request body
126 | $postData = file_get_contents("php://input");
127 | if (strlen($postData) > 0) {
128 | $options[CURLOPT_POST] = true;
129 | $options[CURLOPT_POSTFIELDS] = $postData;
130 | }
131 | curl_setopt_array($session, $options);
132 |
133 | // make the call
134 | $response = curl_exec($session);
135 | $code = curl_getinfo($session, CURLINFO_HTTP_CODE);
136 | $type = curl_getinfo($session, CURLINFO_CONTENT_TYPE);
137 | curl_close($session);
138 |
139 | // set the proper Content-Type
140 | header("Status: ".$code, true, $code);
141 | header("Content-Type: ".$type);
142 |
143 | echo $response;
144 | ?>
145 |
--------------------------------------------------------------------------------
/javascript/SearchSources.js:
--------------------------------------------------------------------------------
1 | define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/array", "dojo/_base/json", "dojo/dom-construct", "esri/lang", "esri/tasks/locator", "esri/layers/FeatureLayer", "esri/dijit/Search"], function (
2 | declare, lang, array, dojoJson, domConstruct, esriLang, Locator, FeatureLayer, Search) {
3 | return declare(null, {
4 |
5 | constructor: function (parameters) {
6 |
7 | var defaults = {
8 | sources: [],
9 | map: null,
10 | //the map
11 | useMapExtent: false,
12 | //When true we restrict world locator to the map extent
13 | geocoders: [],
14 | esriSource: null,
15 | enableSearchingAll: true,
16 | //Geocoders defined in helper services
17 | itemData: null,
18 | //web map item info includes operational layers and info about searches configured on web map
19 | configuredSearchLayers: []
20 | };
21 |
22 | lang.mixin(this, defaults, parameters);
23 | },
24 |
25 | /* Public Methods */
26 |
27 | createOptions: function () {
28 | return {
29 | map: this.map,
30 | sources: this._createSources(),
31 | enableSearchingAll: this.enableSearchingAll,
32 | activeSourceIndex: this._getActiveSource()
33 | };
34 | },
35 |
36 | /* Private Methods */
37 |
38 | //optional array of additional search layers to configure from the application config process
39 | _createSources: function () {
40 | if (this.applicationConfiguredSources) {
41 | this._createAppConfigSources();
42 | } else {
43 | //Create services from org helper services
44 | //Create locators defined in web map item
45 | //Create configured services.
46 | this._createHelperServiceSources();
47 | if (this.itemData) {
48 | this._createWebMapItemSources();
49 | }
50 | if (this.configuredSearchLayers.length > 0) {
51 | this._createConfiguredSources();
52 | }
53 | }
54 |
55 | return this.sources;
56 | },
57 |
58 | _getActiveSource: function () {
59 | var activeIndex = 0;
60 | if (this.hasOwnProperty("activeSourceIndex")) {
61 | activeIndex = this.activeSourceIndex;
62 | }
63 | else{
64 | if (this.sources && this.enableSearchingAll && this.sources.length > 1) {
65 | activeIndex = "all";
66 | }
67 | array.some(this.sources, function (s, index) {
68 | if (!s.hasEsri && s.featureLayer) {
69 | activeIndex = index;
70 | return true;
71 | }
72 | });
73 | }
74 | return activeIndex;
75 | },
76 | _createHelperServiceSources: function () {
77 | var geocoders = lang.clone(this.geocoders);
78 | array.forEach(geocoders, lang.hitch(this, function (geocoder) {
79 | if (geocoder.url.indexOf(".arcgis.com/arcgis/rest/services/World/GeocodeServer") > -1) {
80 | var s = new Search();
81 | var esriSource = s.defaultSource;
82 | esriSource.hasEsri = true;
83 | //Some orgs have the Esri world locator added with
84 | //a custom name defined. Use that name.
85 | if (geocoder.name) {
86 | esriSource.name = geocoder.name;
87 | }
88 | //Restrict search to custom extent if defined
89 | if (this.useMapExtent) {
90 | esriSource.searchExtent = this.map.extent;
91 | }
92 | this.sources.push(esriSource);
93 | s.destroy();
94 | } else if (esriLang.isDefined(geocoder.singleLineFieldName)) {
95 | geocoder.locator = new Locator(geocoder.url);
96 | this.sources.push(geocoder);
97 | }
98 | }));
99 | },
100 |
101 | _createWebMapItemSources: function () {
102 | if (this.itemData && this.itemData.applicationProperties && this.itemData.applicationProperties.viewing && this.itemData.applicationProperties.viewing.search) {
103 | //search is configured on the web map item
104 | var searchOptions = this.itemData.applicationProperties.viewing.search;
105 | array.forEach(searchOptions.layers, lang.hitch(this, function (searchLayer) {
106 | //get the title specified in the item
107 | var operationalLayers = this.itemData.operationalLayers,
108 | layer = null;
109 | array.some(operationalLayers, function (opLayer) {
110 | if (opLayer.id === searchLayer.id) {
111 | layer = opLayer;
112 | return true;
113 | }
114 | });
115 | if (layer && layer.hasOwnProperty("url")) {
116 | var source = {},
117 | url = layer.url,
118 | name = layer.title || layer.name;
119 | if (esriLang.isDefined(searchLayer.subLayer)) {
120 | url = url + "/" + searchLayer.subLayer;
121 | array.some(layer.layerObject.layerInfos, function (info) {
122 | if (info.id === searchLayer.subLayer) {
123 | name += " - " + layer.layerObject.layerInfos[searchLayer.subLayer].name;
124 | return true;
125 | }
126 | });
127 | }
128 | //Get existing layer or create new one
129 | var mapLayer = this.map.getLayer(layer.id);
130 | if (mapLayer && (mapLayer.type === "Feature Layer" || mapLayer.type === "FeatureLayer")) {
131 | source.featureLayer = mapLayer;
132 | } else {
133 | source.featureLayer = new FeatureLayer(url, {
134 | outFields: ["*"]
135 | });
136 | }
137 | source.name = name;
138 | source.exactMatch = searchLayer.field.exactMatch;
139 | source.searchFields = [searchLayer.field.name];
140 | source.displayField = searchLayer.field.name;
141 | source.outFields = ["*"];
142 | source.placeholder = searchOptions.hintText;
143 | this.sources.push(source);
144 | }
145 | }));
146 | }
147 | },
148 | _createAppConfigSources: function () {
149 | // Configured via the new Search Configuation widget
150 | var configSource = lang.clone(this.applicationConfiguredSources);
151 | array.forEach(configSource, lang.hitch(this, function (source) {
152 | if (source.locator) {
153 | source.locator = new Locator(source.url);
154 | } else { //feature layer
155 | var featureLayer = null;
156 | if (source.flayerId) {
157 | featureLayer = this.map.getLayer(source.flayerId);
158 | }
159 | if (!featureLayer && source.url) {
160 | featureLayer = new FeatureLayer(source.url, {
161 | outFields: ["*"]
162 | });
163 | }
164 | source.featureLayer = featureLayer;
165 | }
166 | if (source.searchWithinMap) {
167 | source.searchExtent = this.map.extent;
168 | }
169 | this.sources.push(source);
170 | }));
171 |
172 | },
173 | _createConfiguredSources: function () {
174 | // Old configuration using layer/field picker
175 | array.forEach(this.configuredSearchLayers, lang.hitch(this, function (layer) {
176 | var mapLayer = this.map.getLayer(layer.id);
177 | if (mapLayer) {
178 | var source = {};
179 | source.featureLayer = mapLayer;
180 | if (layer.fields && layer.fields.length && layer.fields.length > 0) {
181 | source.searchFields = layer.fields;
182 | source.displayField = layer.fields[0];
183 | source.outFields = ["*"];
184 | this.sources.push(source);
185 | }
186 | }
187 | }));
188 | }
189 |
190 | });
191 | });
--------------------------------------------------------------------------------
/proxy/proxy.ashx:
--------------------------------------------------------------------------------
1 | <%@ WebHandler Language="C#" Class="proxy" %>
2 | /*
3 | This proxy page does not have any security checks. It is highly recommended
4 | that a user deploying this proxy page on their web server, add appropriate
5 | security checks, for example checking request path, username/password, target
6 | url, etc.
7 | */
8 | using System;
9 | using System.Drawing;
10 | using System.IO;
11 | using System.Web;
12 | using System.Collections.Generic;
13 | using System.Text;
14 | using System.Xml.Serialization;
15 | using System.Web.Caching;
16 |
17 | ///
18 | /// Forwards requests to an ArcGIS Server REST resource. Uses information in
19 | /// the proxy.config file to determine properties of the server.
20 | ///
21 | public class proxy : IHttpHandler {
22 |
23 | public void ProcessRequest (HttpContext context) {
24 |
25 | HttpResponse response = context.Response;
26 |
27 | // Get the URL requested by the client (take the entire querystring at once
28 | // to handle the case of the URL itself containing querystring parameters)
29 | string uri = context.Request.Url.Query.Substring(1);
30 |
31 | // Get token, if applicable, and append to the request
32 | string token = getTokenFromConfigFile(uri);
33 | if (!String.IsNullOrEmpty(token))
34 | {
35 | if (uri.Contains("?"))
36 | uri += "&token=" + token;
37 | else
38 | uri += "?token=" + token;
39 | }
40 |
41 | System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(uri);
42 | req.Method = context.Request.HttpMethod;
43 | req.ServicePoint.Expect100Continue = false;
44 |
45 | // Set body of request for POST requests
46 | if (context.Request.InputStream.Length > 0)
47 | {
48 | byte[] bytes = new byte[context.Request.InputStream.Length];
49 | context.Request.InputStream.Read(bytes, 0, (int)context.Request.InputStream.Length);
50 | req.ContentLength = bytes.Length;
51 |
52 | string ctype = context.Request.ContentType;
53 | if (String.IsNullOrEmpty(ctype)) {
54 | req.ContentType = "application/x-www-form-urlencoded";
55 | }
56 | else {
57 | req.ContentType = ctype;
58 | }
59 |
60 | using (Stream outputStream = req.GetRequestStream())
61 | {
62 | outputStream.Write(bytes, 0, bytes.Length);
63 | }
64 | }
65 |
66 | // Send the request to the server
67 | System.Net.WebResponse serverResponse = null;
68 | try
69 | {
70 | serverResponse = req.GetResponse();
71 | }
72 | catch (System.Net.WebException webExc)
73 | {
74 | response.StatusCode = 500;
75 | response.StatusDescription = webExc.Status.ToString();
76 | response.Write(webExc.Response);
77 | response.End();
78 | return;
79 | }
80 |
81 | // Set up the response to the client
82 | if (serverResponse != null) {
83 | response.ContentType = serverResponse.ContentType;
84 | using (Stream byteStream = serverResponse.GetResponseStream())
85 | {
86 |
87 | // Text response
88 | if (serverResponse.ContentType.Contains("text") ||
89 | serverResponse.ContentType.Contains("json"))
90 | {
91 | using (StreamReader sr = new StreamReader(byteStream))
92 | {
93 | string strResponse = sr.ReadToEnd();
94 | response.Write(strResponse);
95 | }
96 | }
97 | else
98 | {
99 | // Binary response (image, lyr file, other binary file)
100 | BinaryReader br = new BinaryReader(byteStream);
101 | byte[] outb = br.ReadBytes((int)serverResponse.ContentLength);
102 | br.Close();
103 |
104 | // Tell client not to cache the image since it's dynamic
105 | response.CacheControl = "no-cache";
106 |
107 | // Send the image to the client
108 | // (Note: if large images/files sent, could modify this to send in chunks)
109 | response.OutputStream.Write(outb, 0, outb.Length);
110 | }
111 |
112 | serverResponse.Close();
113 | }
114 | }
115 | response.End();
116 | }
117 |
118 | public bool IsReusable {
119 | get {
120 | return false;
121 | }
122 | }
123 |
124 | // Gets the token for a server URL from a configuration file
125 | // TODO: ?modify so can generate a new short-lived token from username/password in the config file
126 | private string getTokenFromConfigFile(string uri)
127 | {
128 | try
129 | {
130 | ProxyConfig config = ProxyConfig.GetCurrentConfig();
131 | if (config != null)
132 | return config.GetToken(uri);
133 | else
134 | throw new ApplicationException(
135 | "Proxy.config file does not exist at application root, or is not readable.");
136 | }
137 | catch (InvalidOperationException)
138 | {
139 | // Proxy is being used for an unsupported service (proxy.config has mustMatch="true")
140 | HttpResponse response = HttpContext.Current.Response;
141 | response.StatusCode = (int)System.Net.HttpStatusCode.Forbidden;
142 | response.End();
143 | }
144 | catch (Exception e)
145 | {
146 | if (e is ApplicationException)
147 | throw e;
148 |
149 | // just return an empty string at this point
150 | // -- may want to throw an exception, or add to a log file
151 | }
152 |
153 | return string.Empty;
154 | }
155 | }
156 |
157 | [XmlRoot("ProxyConfig")]
158 | public class ProxyConfig
159 | {
160 | #region Static Members
161 |
162 | private static object _lockobject = new object();
163 |
164 | public static ProxyConfig LoadProxyConfig(string fileName)
165 | {
166 | ProxyConfig config = null;
167 |
168 | lock (_lockobject)
169 | {
170 | if (System.IO.File.Exists(fileName))
171 | {
172 | XmlSerializer reader = new XmlSerializer(typeof(ProxyConfig));
173 | using (System.IO.StreamReader file = new System.IO.StreamReader(fileName))
174 | {
175 | config = (ProxyConfig)reader.Deserialize(file);
176 | }
177 | }
178 | }
179 |
180 | return config;
181 | }
182 |
183 | public static ProxyConfig GetCurrentConfig()
184 | {
185 | ProxyConfig config = HttpRuntime.Cache["proxyConfig"] as ProxyConfig;
186 | if (config == null)
187 | {
188 | string fileName = GetFilename(HttpContext.Current);
189 | config = LoadProxyConfig(fileName);
190 |
191 | if (config != null)
192 | {
193 | CacheDependency dep = new CacheDependency(fileName);
194 | HttpRuntime.Cache.Insert("proxyConfig", config, dep);
195 | }
196 | }
197 |
198 | return config;
199 | }
200 |
201 | public static string GetFilename(HttpContext context)
202 | {
203 | return context.Server.MapPath("~/proxy.config");
204 | }
205 | #endregion
206 |
207 | ServerUrl[] serverUrls;
208 | bool mustMatch;
209 |
210 | [XmlArray("serverUrls")]
211 | [XmlArrayItem("serverUrl")]
212 | public ServerUrl[] ServerUrls
213 | {
214 | get { return this.serverUrls; }
215 | set { this.serverUrls = value; }
216 | }
217 |
218 | [XmlAttribute("mustMatch")]
219 | public bool MustMatch
220 | {
221 | get { return mustMatch; }
222 | set { mustMatch = value; }
223 | }
224 |
225 | public string GetToken(string uri)
226 | {
227 | foreach (ServerUrl su in serverUrls)
228 | {
229 | if (su.MatchAll && uri.StartsWith(su.Url, StringComparison.InvariantCultureIgnoreCase))
230 | {
231 | return su.Token;
232 | }
233 | else
234 | {
235 | if (String.Compare(uri, su.Url, StringComparison.InvariantCultureIgnoreCase) == 0)
236 | return su.Token;
237 | }
238 | }
239 |
240 | if (mustMatch)
241 | throw new InvalidOperationException();
242 |
243 | return string.Empty;
244 | }
245 | }
246 |
247 | public class ServerUrl
248 | {
249 | string url;
250 | bool matchAll;
251 | string token;
252 |
253 | [XmlAttribute("url")]
254 | public string Url
255 | {
256 | get { return url; }
257 | set { url = value; }
258 | }
259 |
260 | [XmlAttribute("matchAll")]
261 | public bool MatchAll
262 | {
263 | get { return matchAll; }
264 | set { matchAll = value; }
265 | }
266 |
267 | [XmlAttribute("token")]
268 | public string Token
269 | {
270 | get { return token; }
271 | set { token = value; }
272 | }
273 | }
274 |
--------------------------------------------------------------------------------
/readme.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Public Gallery Template - Read Me
5 |
34 |
35 |
36 |
This template provides a starting point for creating your Web application. This easily configurable template allows you to define options for displaying a group. This read-me file explains how to setup and configure the template to run on your web server. We have also provided a few tips on how to personalize the template by adding a company logo and customizing the content.
These instructions assume that you have a Web server like Internet Information Services(IIS) installed and setup on your machine. If you are using another Web server, the general installation steps will be the same, but you will need to check your Web server's documentation for specific information on deploying and testing the application.
53 |
54 |
Copy the contents of the zip file into your web server's root directory. In IIS, the default location for the web server's root folder is c:\inetpub\wwwroot.
55 |
If your application edits the features in a feature service, enables the elevation chart, contains secure services or web maps that aren't publicly shared or generates requests that exceed 2000 characters you may need to setup and use a proxy page. One example where you may exceed the URL length is by using complex polygons as an input to a task. Another example is by specifying a spatial reference using well-known text (wkt).
56 | View the Using the proxy page help topic for details on installing and configuring a proxy page. After setting up the proxy, set the proxyUrl option in index.html to point to your proxy.
57 |
Test the page using the following URL: http://localhost/[template name]/index.html, where [template name] is the name of the folder where you extracted the zip contents.
Now let's configure the application to use a different group and modify configuration options.
62 |
63 |
64 |
Every group on ArcGIS.com has a unique identifier (id). To find the group's id, navigate to ArcGIS.com, and find the group you want to display. If it is one of your groups, make sure it's shared with everyone (public).
65 |
To find the group's id:
66 |
67 |
Option 1:
68 |
69 |
Use the sample ArcGIS Online Group ID Finder demo which searches for groups by ArcGIS Online username. You can get private group ID's by using the "Sign In" link on the demo tool to log into your account and display your private groups. ArcGIS Online Group ID Finder
70 |
71 |
72 |
Option 2:
73 |
74 |
Navigate to the group's page.
75 |
Right-click on the group's image to copy it's URL location or open it's location in a new tab/window.
76 |
77 |
78 |
View the URL and copy the id as highlighted in the URL. The section you need to copy is highlighted in the image below.
79 |
80 |
81 |
82 |
83 |
84 |
Open the "/config/options.js" file in a text editor. The "/config/options.js" file is located in the config folder in the root directory of this application.
85 |
To modify the group, replace the string for id with your group's id.
86 |
By default, the application displays the ArcGIS.com group's title as the application's home heading, the group's summary as the application's home snippet and the group's description as the application's home side content. You can overwrite these by setting the following properties:
93 |
94 |
95 | "homeHeading":"This is a custom title for your home page",
96 | "homeSnippet":"This is a custom summary for home map",
97 | "homeSideContent":"This is a custom description for your home page",
98 |
99 |
100 |
101 |
By default, the application displays the ArcGIS.com map's title as the application's title and the map's summary as the application's subtitle. You can overwrite these by setting the following properties:
102 |
103 |
104 | "mapTitle":"This is a custom title for your map",
105 | "mapSnippet":"This is a custom subtitle",
106 | "mapItemDescription":"This is a custom description",
107 |
108 |
109 |
110 |
You can edit this file to set the following application properties:
111 |
112 |
appid: ID of application on ArcGIS.com containing your settings for this template.
113 |
theme: Color theme to use. Options are "blueTheme", "redTheme" or "greenTheme".
114 |
siteTitle: The name of your website.
115 |
siteBannerImage: URL for logo image. If empty, Site Title text is used in its place.
116 |
mapTitle: If not specified, the ArcGIS.com map's title is used.
117 |
mapSnippet: If not specified, the ArcGIS.com web map's summary is used
118 |
mapItemDescription: Displayed in the about section of the map page. Defaults to map description.
119 |
homeHeading: Heading displayed on the index page. Uses group title by default.
120 |
homeSnippet: Summary displayed on the index page. Uses group summary by default.
121 |
homeSideHeading: Heading displayed on the side-content on the index page.
122 |
homeSideContent: Displayed on the side of the index page. Defaults to group description.
123 |
footerHeading: Heading displayed in the footer.
124 |
footerDescription: Content displayed in the footer.
125 |
footerLogo: Image displayed in the footer. Defaults to group image.
126 |
footerLogoUrl: Link used for the footer image. Defaults to link to group page on ArcGIS.com
127 |
addThisProfileId: Account ID for AddThis.com. Defaults to generic.
128 |
defaultLayout: Default layout to use. "grid" or "list".
129 |
searchString: Peforms a default search on the group with the set string.
130 |
sortField: Order to display the group items. Valid fields are: title, modified, type, owner, avgRating, numRatings, numComments and numViews.
131 |
sortOrder: Order to sort the group: "asc" or "desc".
132 |
mapViewer: URL to open the gallery items to. "simple", "explorer", "explorer_present", "arcgis".
133 |
galleryItemsPerPage: Number of gallery items to show per page.
134 |
showProfileUrl: Show link to user profile . true or false.
135 |
showSocialButtons: Show social media buttons. true or false.
136 |
showFooter: Show footer. true or false.
137 |
showBasemapGallery: Show basemap gallery on map: true or false.
138 |
showGroupSearch: Show group search on index: true or false.
139 |
showGroupSort: Show sorting bar for group.
140 |
showMapSearch: Show map search on map: true or false.
141 |
showLayerToggle: Show layer toggle on legend: true or false.
142 |
showLayoutSwitch: Show layout switch on index: true or false.
143 |
showOverviewMap: Show overview on map: true or false.
144 |
showMoreInfo: Show more info link in about on map: true or false.
145 |
showPagination: Show pagination on index: true or false.
146 |
showExplorerButton: Show explorer button on map: true or false.
147 |
showArcGISOnlineButton: Show ArcGIS button on map: true or false.
148 |
showLicenseInfo: Show Use Constraints on map page.
149 |
showAttribution: Show sources on map page.
150 |
showComments: Show comments on map page.
151 |
showRatings: Show ratings of items in group and on map page.
152 |
showMobileButtons: Show map buttons to open in the mobile app or download the mobile app: true or false.
153 |
openGalleryItemsNewWindow: Open WebMaps in a new window: true or false.
154 |
bannerBackground: Background image displayed in the center of the page banner.
155 |
proxyUrl: Proxy URL.
156 |
sharingurl: Portal sharing URL.
157 |
mobilePortalUrl: Mobile Portal URL.
158 |
pointGraphic: Graphic displayed when locating addresses.
159 |
160 |
161 |
Save the file then test your application and note that it now displays your group and if specified your custom properties.
In this section, you will see how to personalize the application by adding a logo, adding custom HTMl to the footer, creating an Addthis.com account and developing a custom theme.
You can insert HTML into many of the config values to further customize the template. However, the HTML needs to be escaped in order to be used in the config JSON.