From f351f1deb8ea9b51c2b7d50e2027b87620697464 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Thu, 28 Mar 2013 16:05:23 -0700 Subject: [PATCH 01/54] Update version.xml to 3.3. --- src/version.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.xml b/src/version.xml index d7377f6..ffbbf61 100644 --- a/src/version.xml +++ b/src/version.xml @@ -1,2 +1,2 @@ - + From a837541246abe539e4e5b791c5391016ceac7a48 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 25 Mar 2013 16:49:16 -0700 Subject: [PATCH 02/54] Ensure URL extent/center coordinates are valid. --- src/com/esri/viewer/managers/MapManager.mxml | 42 +++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/src/com/esri/viewer/managers/MapManager.mxml b/src/com/esri/viewer/managers/MapManager.mxml index 6fefa9f..12795a9 100644 --- a/src/com/esri/viewer/managers/MapManager.mxml +++ b/src/com/esri/viewer/managers/MapManager.mxml @@ -276,14 +276,14 @@ Class used to configure the viewer map component (including layers) and handle m { var ext:String = m_configData.mapAttrs[i].extent; var extArray:Array = ext.split(" "); - var extent:Extent = new Extent(Number(extArray[0]), Number(extArray[1]), Number(extArray[2]), Number(extArray[3])); + var extent:Extent = createExtent(extArray); m_fullExtent = extent; } else if (id == "initial") { var iext:String = m_configData.mapAttrs[i].extent; var iextArray:Array = iext.split(" "); - initialExtent = new Extent(Number(iextArray[0]), Number(iextArray[1]), Number(iextArray[2]), Number(iextArray[3])); + initialExtent = createExtent(iextArray); } else if (id == "center") { @@ -392,6 +392,23 @@ Class used to configure the viewer map component (including layers) and handle m } } + private function createExtent(extentArray:Array):Extent + { + if (extentArray && extentArray.length == 4) + { + var xMin:Number = parseFloat(extentArray[0]); + var yMin:Number = parseFloat(extentArray[1]); + var xMax:Number = parseFloat(extentArray[2]); + var yMax:Number = parseFloat(extentArray[3]); + } + + var canCreateExtent:Boolean = + !isNaN(xMin) && !isNaN(yMin) + && !isNaN(xMax) && !isNaN(yMax); + + return canCreateExtent ? new Extent(xMin, yMin, xMax, yMax) : null; + } + private function map_loadHandler(event:MapEvent):void { var center:String; @@ -419,15 +436,20 @@ Class used to configure the viewer map component (including layers) and handle m var centerXY:Array = center.split(" "); if (centerXY.length == 2) { - var centerPt:MapPoint = new MapPoint(centerXY[0], centerXY[1]); - map.centerAt(centerPt); - if (scale > 0) - { - map.scale = scale; - } - else if (level >= 0) + var centerX:Number = parseFloat(centerXY[0]); + var centerY:Number = parseFloat(centerXY[1]); + + if (!isNaN(centerX) && !isNaN(centerY)) { - map.level = level; + map.centerAt(new MapPoint(centerX, centerY)); + if (scale > 0) + { + map.scale = scale; + } + else if (level >= 0) + { + map.level = level; + } } } } From dceb932e29d98668b2e4f78db9c1a860e42d245b Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 25 Mar 2013 16:51:02 -0700 Subject: [PATCH 03/54] Clean up. --- src/com/esri/viewer/managers/MapManager.mxml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/esri/viewer/managers/MapManager.mxml b/src/com/esri/viewer/managers/MapManager.mxml index 12795a9..8b7d660 100644 --- a/src/com/esri/viewer/managers/MapManager.mxml +++ b/src/com/esri/viewer/managers/MapManager.mxml @@ -47,7 +47,6 @@ Class used to configure the viewer map component (including layers) and handle m import com.esri.ags.layers.Layer; import com.esri.ags.layers.supportClasses.Field; import com.esri.ags.layers.supportClasses.LayerDetails; - import com.esri.ags.layers.supportClasses.LayerInfo; import com.esri.ags.layers.supportClasses.LayerInfoWindowRenderer; import com.esri.ags.layers.supportClasses.StaticLayer_m_esriLogo; import com.esri.ags.layers.supportClasses.TableDetails; From 371fd5af01dc7e67a8db8fca92c43cdf674cec7e Mon Sep 17 00:00:00 2001 From: jcfranco Date: Thu, 28 Mar 2013 16:24:29 -0700 Subject: [PATCH 04/54] Clean up. --- src/com/esri/viewer/managers/MapManager.mxml | 23 +++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/com/esri/viewer/managers/MapManager.mxml b/src/com/esri/viewer/managers/MapManager.mxml index 8b7d660..4306014 100644 --- a/src/com/esri/viewer/managers/MapManager.mxml +++ b/src/com/esri/viewer/managers/MapManager.mxml @@ -273,16 +273,13 @@ Class used to configure the viewer map component (including layers) and handle m if (id == "full") { - var ext:String = m_configData.mapAttrs[i].extent; - var extArray:Array = ext.split(" "); - var extent:Extent = createExtent(extArray); - m_fullExtent = extent; + var fullExtentTextCoordinates:String = m_configData.mapAttrs[i].extent; + m_fullExtent = createExtent(fullExtentTextCoordinates.split(" ")); } else if (id == "initial") { - var iext:String = m_configData.mapAttrs[i].extent; - var iextArray:Array = iext.split(" "); - initialExtent = createExtent(iextArray); + var initExtentTextCoordinates:String = m_configData.mapAttrs[i].extent; + initialExtent = createExtent(initExtentTextCoordinates.split(" ")); } else if (id == "center") { @@ -391,14 +388,14 @@ Class used to configure the viewer map component (including layers) and handle m } } - private function createExtent(extentArray:Array):Extent + private function createExtent(extentTextCoordinates:Array):Extent { - if (extentArray && extentArray.length == 4) + if (extentTextCoordinates && extentTextCoordinates.length == 4) { - var xMin:Number = parseFloat(extentArray[0]); - var yMin:Number = parseFloat(extentArray[1]); - var xMax:Number = parseFloat(extentArray[2]); - var yMax:Number = parseFloat(extentArray[3]); + var xMin:Number = parseFloat(extentTextCoordinates[0]); + var yMin:Number = parseFloat(extentTextCoordinates[1]); + var xMax:Number = parseFloat(extentTextCoordinates[2]); + var yMax:Number = parseFloat(extentTextCoordinates[3]); } var canCreateExtent:Boolean = From 224cada5f90dd73aec8b2c4e51721b1a8e359e78 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Fri, 29 Mar 2013 11:33:20 -0700 Subject: [PATCH 05/54] Update to version 3.3 --- locale/en_US/ViewerStrings.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en_US/ViewerStrings.properties b/locale/en_US/ViewerStrings.properties index 02314fc..81abb71 100644 --- a/locale/en_US/ViewerStrings.properties +++ b/locale/en_US/ViewerStrings.properties @@ -1,7 +1,7 @@ # -- UI related messages for the context menu on the map, in addition to messages from the api -- # contextMenuText=About ArcGIS Viewer for Flex... -aboutText=This application is using ArcGIS Viewer for Flex version 3.2. +aboutText=This application is using ArcGIS Viewer for Flex version 3.3. aboutLearnMoreBtn=Learn more aboutCloseBtn=Close From a9a6b4ae7b373875750d9253fc04cdb78ea20ea4 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Fri, 29 Mar 2013 11:42:39 -0700 Subject: [PATCH 06/54] Updated Hebrew strings --- locale/he_IL/ViewerStrings.properties | 108 +++++++++++++------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/locale/he_IL/ViewerStrings.properties b/locale/he_IL/ViewerStrings.properties index 2f091cd..7be5b8e 100644 --- a/locale/he_IL/ViewerStrings.properties +++ b/locale/he_IL/ViewerStrings.properties @@ -12,8 +12,8 @@ minimize=מזער -panelExpandTooltip=הקלק להרחבת הפאנל -panelCollapseTooltip=הקלק לקיפול הפאנל +panelExpandTooltip=הקש להרחבת הפאנל +panelCollapseTooltip=הקש לצמצום הפאנל locateExampleValueX=34.7932 @@ -46,19 +46,19 @@ unitsAcres=אקרים unitsAcresAbbr=אקר unitsHectares=הקטרים unitsHectaresAbbr=הקטאר -unitsSquareFeet=רגל מרובע -unitsSquareFeetAbbr=ר' בריבוע -unitsSquareKilometers=ק"מ מרובע -unitsSquareKilometersAbbr=ק"מ בריבוע -unitsSquareMeters=מ' מרובע +unitsSquareFeet=רגל רבוע +unitsSquareFeetAbbr=ר' רבוע +unitsSquareKilometers=קילומטרים רבועים +unitsSquareKilometersAbbr=ק"מ רבוע +unitsSquareMeters=מטרים רבועים unitsSquareMetersAbbr=מ' בריבוע -unitsSquareMiles=מיילים מרובעים -unitsSquareMilesAbbr=מייל בריבוע -unitsSquareYards=יארדים מרובעים -unitsSquareYardsAbbr=יארד בריבוע +unitsSquareMiles=מיילים רבועים +unitsSquareMilesAbbr=מייל רבוע +unitsSquareYards=יארדים רבועים +unitsSquareYardsAbbr=יארד רבוע -tocMapLayerZoomToLabel=התמקדול +tocMapLayerZoomToLabel=התמקדות tocMapLayerTransparencyLabel=שקיפות tocMapLayerOpaqueLabel=אטום tocMapLayerTransparentLabel=שקוף @@ -85,24 +85,24 @@ layerFailedToLoad:טעינת שכבה {0} נכשלה: {1} couldNotFetchBasemapData=לא יכול להביא נתוני מפת בסיס:\n{0} couldNotConnectToPortal=לא יכול להתחבר לפורטל. couldNotQueryPortal=לא יכול לתשאל פורטל. -couldNotQueryPortalItems=לא יכול לתשאל פרטי פורטל. +couldNotQueryPortalItems=לא יכול לתשאל פריטי פורטל. serverMissingCrossDomain=לשרת GIS חסר קובץ crossdomain serviceIsInaccessible=שירות לא קיים או לא נגיש. unauthorizedAccess=אין לך הרשאות לגשת לשירות זה. unknownErrorCause=סיבת שגיאה לא ידועה. resourceAccessDenied=אין לך הרשאות לגשת למקור זה. -signInAborted=הכניסה נכשלה +signInAborted=ההתחברות נכשלה invalidWidgetId=widgetId לא תקין: {0} printTaskExecutionError=שגיאה בביצוע משימת הדפסה:\n\n{0} gpServiceConnectionError=לא יכול להתחבר לשירות GP:\n{0}\n\n{1}\n{2} locatorServiceConnectionError=לא יכול להתחבר לשירות מגדיר עיגון כתובות:\n{0}\n\n{1}\n{2} -singleLineGeocodingNotSupportedError=שירות מגדיר עיגון כתובות לא תומך בעיגון כתובות שורה אחת. +singleLineGeocodingNotSupportedError=שירות מגדיר עיגון כתובות לא תומך בעיגון כתובות בשורה בודדת. rssFeedParsingError=אירעה בעיה בזמן פריסת ה- RSS feed. {0} httpResponseNotXMLError=תגובת HTTP אינה XML. unknownRSSFeedTypeError=לא מצליח לקבוע סוג RSS feed. initializationError=אירעה בעיה בזמן אתחול: {0} unableToDetermineGPExecutionType=לא יכול לקבוע סוג ביצוע geoprocessing: -projectionError=שגיאה בהיטל גיאומטרי: {0} +projectionError=שגיאה בהתמרת היטל הגיאומטריה: {0} cannotRunTaskExecutionTypeUnknownError=לא יכול להריץ משימה: סוג ביצוע לא ידוע. layerDataRetrievalError=לא יכול לקבל נתוני שכבה. couldNotDeleteFeature=לא יכול למחוק ישות @@ -112,15 +112,15 @@ uploadSecurityError=ארעה שגיאת אבטחה בזמן העלאת קובץ: uploadIOError=ארעה שגיאת IO בזמן העלאת קובץ: {0} uploadUnknownError=שגיאה לא ידועה ארעה בזמן העלאת הקובץ. couldNotProcessUploadResponse=לא ניתן לעבד את התגובה לסיום תהליך ההעלאה. -fileExceedsAllowedUploadSize=גודל הקובץ עולה על הגודל המקסימלי המותר בהעלאה. ({0} MB) -fileUploadError=שגיאת העלאת קובץ +fileExceedsAllowedUploadSize=גודל הקובץ עולה על הגודל המקסימלי המותר בטעינה. ({0} MB) +fileUploadError=שגיאה בטעינת קובץ -configFileCrossDomain=נושא crossdomain אפשרי: {0}{1} +configFileCrossDomain=כנראה נושא crossdomain : {0}{1} -openToolTip=לחץ לפתוח מפת סקירה כללית -closeToolTip=לחץ לסגור מפת סקירה כללית +openToolTip=לחץ לפתיחת מפת התמצאות +closeToolTip=לחץ לפתיחת מפת התמצאות layerListLabel=עוד... @@ -172,16 +172,16 @@ textFont1=Arial textFont2=Courier New textFont3=Broadway textFont4=Comic Sans MS -textFont5=אלג'יריאני +textFont5=Algerian textFont6=Verdana -lineStyleSolid=רציף -lineStyleDash=מקף +lineStyleSolid=מלא +lineStyleDash=מקווקוו lineStyleDot=נקודה -lineStyleDashDot=Dash Dot -lineStyleDashDotDot=Dash Dot Dot +lineStyleDashDot=קו נקודה +lineStyleDashDotDot=קו נקודה נקודה -fillStyleSolid=רציף +fillStyleSolid=מלא fillStyleBackwardDiagonal=אחורה באלכסון fillStyleCross=צלב fillStyleForwardDiagonal=קדימה באלכסון @@ -191,7 +191,7 @@ fillStyleVertical=אנכי markerAlphaLabel=אלפא -markerColorLabel=צבע סימול +markerColorLabel=צבע סמל markerSizeLabel=גודל markerStyleLabel=סגנון markerOutlineColorLabel=צבע קו תוחם @@ -201,7 +201,7 @@ textColorLabel=צבע textFontLabel=גופן textSizeLabel=גודל textBoldLabel=B -textBoldTooltip=Bold +textBoldTooltip=מודגש textItalicLabel=I textItalicTooltip=Italic textUnderlineLabel=U @@ -235,40 +235,40 @@ bookmarkMissingNameLabel=אנא הכנס שם לסימניה deleteBookmarkTooltip=מחק סימניה -descLabel=ייצא נתונים והורד קובץ zip +descLabel=גזור נתונים והורד קובץ zip step1Label=1. בחר אזור -dataCurrentExtentLabel=1. הנתונים יופקו מתוך התיחום הנוכחי שלך. -step2Label=2. בחר שכבות להפקה +dataCurrentExtentLabel=1. הנתונים ייגזרו מתוך התיחום הנוכחי שלך. +step2Label=2. בחר שכבות לגזירה step3Label=2. בחר פורמט קובץ step4Label=4. בחר פורמט רסטר step5Label=5. SpatialReference -extractButtonLabel=ייצוא +extractButtonLabel=גזירה step1ErrorLabel=אנא בחר אזור עניין. -step2ErrorLabel=אנא בחר שכבות להפקה -emptyResultsLabel=משימה הסתיימה אך לא הניבה תוצאות. -saveDataFileLabel=נוצר קובץ נתונים. האם ברצונך לשמור זאת? +step2ErrorLabel=אנא בחר שכבות לגזירה +emptyResultsLabel=הרצת הכלי הסתיימה אך לא הוחזרו תוצאות. +saveDataFileLabel=נוצר קובץ נתונים. האם ברצונך לשמור אותו? attributesLabel=מאפיינים -attachmentsLabel=קישורים +attachmentsLabel=קבצים מקושרים relatedRecordsLabel=רשומות מקושרות -featureLayerOutOfScaleText=שכבת ישויות זו נמצאת מחוץ לטווח קנה מידה -showAttachmentsText=קישורים +featureLayerOutOfScaleText=שכבת ישויות זו נמצאת מחוץ לטווח קנה מידה לתצוגה +showAttachmentsText=קבצים מקושרים showRelatedRecordsText=רשומות מקושרות showAttributesText=חזור selectTemplateText=בחר תבנית בכדי ליצור ישות noEditableLayersText=לא נמצאו שכבות הניתנות לעריכה. noCreateCapabilityLayersText=לאף אחת מהשכבות יש יכולת יצירה -layerNotSupportingAttachmentsText=השכבה לא תומכת בקבצים מצורפים -noAttachmentsText=אין קבצים מצורפים +layerNotSupportingAttachmentsText=השכבה לא תומכת בקבצים מקושרים +noAttachmentsText=אין קבצים מקושרים chooseFileText=בחר קובץ לצרוף -attachmentSubmitLabel=הגש +attachmentSubmitLabel=בצע attachmentCancelLabel=ביטול singleAttachmentText=לישות יש קישור {0} multipleAttachmentsText=לישות יש {0} קישורים -layerListTitle=ניראות של שכבה +layerListTitle=תצוגת שכבות locateSubmitLabel=אתר @@ -293,9 +293,9 @@ printSubtitle= printCopyright= printTitleLabel=כותרת printSubtitleLabel=תת כותרת -printCopyrightLabel=זכות יוצרים +printCopyrightLabel=זכויות יוצרים printAuthorLabel=מחבר -printLayoutTemplatesLabel=תבניות מבט מפה +printLayoutTemplatesLabel=תבניות מפה printFormatsLabel=פורמטים printScaleLabel=השתמש בקנה מידה זה @@ -308,12 +308,12 @@ featuresFoundLabel=ישויות שנמצאו: {0} drivingDirectionLabel=הוראות נסיעה -routeSubmitLabel=קבל הוראות +routeSubmitLabel=קבל הוראות נסיעה moveUpTooltip=העבר למעלה moveDownTooltip=העבר למטה addLocationTooltip=לחץ על המפה בכדי להוסיף מיקום optionsLabel=אפשרויות -bestSequenceLabel=מצא רצף טוב ביותר +bestSequenceLabel=מצא את הרצף טוב ביותר milesLabel=מיילים metricLabel=ק"מ changeRouteSymbolLabel=שנה סמל מסלול @@ -324,8 +324,8 @@ graphicalTitleBarTooltip=בחר ישויות textTitleBarTooltip=בחירה לפי מאפיינים graphicalsearchLabel=בחר ישויות לפי textsearchLabel=בחירה לפי מאפיינים -layerLabel=חיפוש שכבה -nolayerLabel=לא הוגדר חיפוש שכבה +layerLabel=שכבת חיפוש +nolayerLabel=לא הוגדרה שכבה לחיפוש searchSubmitLabel=חיפוש selectionLabel=ישויות שנבחרו: @@ -334,7 +334,7 @@ latitudeLabel=קו רוחב longitudeLabel=קו אורך -gpSubmitLabel=הגש +gpSubmitLabel=בצע inputLabel=קלט helpLabel=עזרה outputLabel=פלט @@ -342,12 +342,12 @@ copyToClipboard=העתק ללוח עריכה unsupportedInputType=קלט {0} לא נתמך currentExtentWillBeUsedAsInput=התיחום הנוכחי יהיה הקלט. byURL=לפי URL -fileURL=קובץ URL -uploadFile=העלאת קובץ +fileURL=URL לקובץ +uploadFile=טעינת קובץ or=או -zoomLabel=התמקדול +zoomLabel=התמקדות helloContent=שנה טקסט זה בקובץ התצורה @@ -363,4 +363,4 @@ drawToolMenuLabel=בחר כלי שרטוט selectLabel=בחר noLayersLabel=אין שכבות noChartDataToDisplayLabel=אין תרשים נתונים לתצוגה -featureLayerNotVisibleText=שכבת ישויות אינה נצפית או נמצאת מחוץ לטווח קנה מידה. \ No newline at end of file +featureLayerNotVisibleText=שכבת ישויות אינה מוצגת או נמצאת מחוץ לטווח קנה מידה לתצוגה. \ No newline at end of file From bc53286aa3a52abe810bd3439ea9a521a7365eca Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Fri, 29 Mar 2013 11:50:11 -0700 Subject: [PATCH 07/54] Update Korean font list --- locale/ko_KR/ViewerStrings.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/ko_KR/ViewerStrings.properties b/locale/ko_KR/ViewerStrings.properties index b44eada..17b806c 100644 --- a/locale/ko_KR/ViewerStrings.properties +++ b/locale/ko_KR/ViewerStrings.properties @@ -168,11 +168,11 @@ markerStyleSquare=사각형 markerStyleTriangle=삼각형 markerStyleX=X -textFont1=Arial -textFont2=Courier New -textFont3=Broadway +textFont1=Malgun Gothic +textFont2=Batang +textFont3=Courier New textFont4=Comic Sans MS -textFont5=Algerian +textFont5=Arial textFont6=Verdana lineStyleSolid=단선 From 0928ad5a49101d80618b63cf2e51ab137b51d650 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 1 Apr 2013 11:37:28 -0700 Subject: [PATCH 08/54] Check uploads capability only if there is at least one GP param that will use upload. --- .../Geoprocessing/GeoprocessingWidget.mxml | 3 ++- .../supportClasses/GPParamHandler.as | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/widgets/Geoprocessing/GeoprocessingWidget.mxml b/src/widgets/Geoprocessing/GeoprocessingWidget.mxml index 1592fc2..0e7a011 100644 --- a/src/widgets/Geoprocessing/GeoprocessingWidget.mxml +++ b/src/widgets/Geoprocessing/GeoprocessingWidget.mxml @@ -238,7 +238,8 @@ private function checkIfUploadSupported(gpServerDescription:Object):void { - if (gpServerDescription.currentVersion >= 10.1) + if (gpServerDescription.currentVersion >= 10.1 + && gpParamHandler.hasUploadCompatibleParams()) { var uploadsInfoRequest:JSONTask = new JSONTask(gpServerDescription.url + "uploads/info"); uploadsInfoRequest.proxyURL = gpServerDescription.proxyURL; diff --git a/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as b/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as index ca56ba4..26dd1e1 100644 --- a/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as +++ b/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as @@ -425,5 +425,21 @@ public class GPParamHandler param.serviceInfo = serviceInfo; } } + + public function hasUploadCompatibleParams():Boolean + { + var hasUploadCompatibleInputParam:Boolean = false; + + for each (var param:IGPParameter in inputParams) + { + if (param.type == GPParameterTypes.DATA_FILE) + { + hasUploadCompatibleInputParam = true; + break; + } + } + + return hasUploadCompatibleInputParam; + } } } From 54e1a9406103aaa1183e39676d1d6d0b3eaf0401 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 2 Apr 2013 14:08:55 -0700 Subject: [PATCH 09/54] Clean up. --- src/widgets/Geoprocessing/GeoprocessingWidget.mxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/Geoprocessing/GeoprocessingWidget.mxml b/src/widgets/Geoprocessing/GeoprocessingWidget.mxml index 0e7a011..d73d705 100644 --- a/src/widgets/Geoprocessing/GeoprocessingWidget.mxml +++ b/src/widgets/Geoprocessing/GeoprocessingWidget.mxml @@ -259,7 +259,7 @@ private function uploadsInfoRequest_resultHandler(response:Object, gpServerDescription:Object):void { gpServerDescription.maxUploadFileSize = response.maxUploadFileSize; - gpServerDescription.supportsUploads = !isNaN(gpServerDescription.maxUploadFileSize); + gpServerDescription.supportsUploads = true; continueInitialization(); } From 489c1d79f4c0a202d984e51e2a7029b141793cb1 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 2 Apr 2013 16:19:56 -0700 Subject: [PATCH 10/54] Restore DrawWidget draw tips. --- src/widgets/Draw/DrawWidget.mxml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/widgets/Draw/DrawWidget.mxml b/src/widgets/Draw/DrawWidget.mxml index af920ab..afb5f14 100644 --- a/src/widgets/Draw/DrawWidget.mxml +++ b/src/widgets/Draw/DrawWidget.mxml @@ -569,7 +569,7 @@ showMeasurements = true; drawStatus = drawLineLabel; - setMapAction(drawType, drawStatus, lineSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, lineSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } case DrawTool.FREEHAND_POLYLINE: @@ -579,7 +579,7 @@ showMeasurements = true; drawStatus = drawFreehandLineLabel; - setMapAction(drawType, drawStatus, lineSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, lineSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } case DrawTool.EXTENT: @@ -589,7 +589,7 @@ showMeasurements = true; drawStatus = drawRectangleLabel; - setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } case DrawTool.CIRCLE: @@ -599,7 +599,7 @@ showMeasurements = true; drawStatus = drawCircleLabel; - setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } case DrawTool.ELLIPSE: @@ -609,7 +609,7 @@ showMeasurements = true; drawStatus = drawEllipseLabel; - setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } case DrawTool.POLYGON: @@ -619,7 +619,7 @@ showMeasurements = true; drawStatus = drawPolygonLabel; - setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } case DrawTool.FREEHAND_POLYGON: @@ -629,7 +629,7 @@ showMeasurements = true; drawStatus = drawFreehandPolygonLabel; - setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler, false, false); + setMapAction(drawType, drawStatus, fillSymbol, map_drawEndHandler, map_drawUpdateHandler); break; } } From f74bb722530d6261043fec7959516a44b2f786e2 Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Fri, 5 Apr 2013 13:42:09 -0700 Subject: [PATCH 11/54] allow configuring column delimiter when exporting csv (requires ArcGIS API for Flex 3.3) --- src/widgets/AttributeTable/AttributeTableWidget.mxml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/widgets/AttributeTable/AttributeTableWidget.mxml b/src/widgets/AttributeTable/AttributeTableWidget.mxml index 582cb7d..f1be28a 100644 --- a/src/widgets/AttributeTable/AttributeTableWidget.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidget.mxml @@ -223,6 +223,10 @@ { layerSettings.exportLocation = layerXML.exportlocation; } + if (layerXML.exportcolumndelimiter.length() > 0) + { + layerSettings.exportColumnDelimiter = layerXML.exportcolumndelimiter; + } if (layerXML.showattachments.length() > 0) { layerSettings.showAttachments = layerXML.showattachments; @@ -882,6 +886,10 @@ { attributeTable.exportLocation = settings.exportLocation == "true"; } + if (settings.exportColumnDelimiter) + { + attributeTable.exportColumnDelimiter = settings.exportColumnDelimiter; + } if (settings.showAttachments) { attributeTable.showAttachments = settings.showAttachments == "true"; From 9920a96860ba9b69ff91975f9404171c8614a200 Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Mon, 8 Apr 2013 11:59:45 -0700 Subject: [PATCH 12/54] allow MapService without matching FeatureService to be used in AttributeTable widget --- .../AttributeTable/AttributeTableWidget.mxml | 311 +++++++++--------- 1 file changed, 164 insertions(+), 147 deletions(-) diff --git a/src/widgets/AttributeTable/AttributeTableWidget.mxml b/src/widgets/AttributeTable/AttributeTableWidget.mxml index f1be28a..7ec9837 100644 --- a/src/widgets/AttributeTable/AttributeTableWidget.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidget.mxml @@ -405,187 +405,204 @@ jsonTask.proxyURL = layer.proxyURL; jsonTask.token = layer.token; jsonTask.url = featureServiceURL; - jsonTask.execute(urlVars, new AsyncResponder(jsonTask_resultHandler, jsonTask_faultHandler, { layer: layer, count: index })); + jsonTask.execute(urlVars, new AsyncResponder(jsonTask_resultHandler, jsonTask_faultHandler)); function jsonTask_resultHandler(resultObject:Object, token:Object = null):void - { - const layers:Array = resultObject.layers; + { + var layers:Array = resultObject.layers; if (layers && layers.length) { - var arcGISDynamicMapServiceLayer:ArcGISDynamicMapServiceLayer = ArcGISDynamicMapServiceLayer(token.layer); - - var atleastOneFeatureLayerAlreadyIncluded:Boolean; - var candidateFeatureLayers:Array = []; - for (var i:int = 0; i < layers.length; ) + createFeatureLayersFromDynamicMapService2(layer, featureServiceURL, layers, gdbVersion, index, onMapLayerAdd); + } + else + { + index += 1; + getAllFeatureLayers(index, featureLayers); + } + } + function jsonTask_faultHandler(fault:Fault, token:Object = null):void + { + var layers:Array = []; + for each (var layerInfo:LayerInfo in layer.layerInfos) + { + if (!layerInfo.subLayerIds) { - if (isFeatureLayerPartOfOpList(featureServiceURL + "/" + layers[i].id, gdbVersion)) - { - atleastOneFeatureLayerAlreadyIncluded = true; - break; - } - else - { - if (!isLayerPartOfExcludeLayers(arcGISDynamicMapServiceLayer.name + "/" + layers[i].id)) - { - candidateFeatureLayers.push(layers[i]); - } - i++; - } + layers.push({ id: layerInfo.layerId, name: layerInfo.name }); } - if (!atleastOneFeatureLayerAlreadyIncluded && candidateFeatureLayers.length) + } + if (layers && layers.length) + { + featureServiceURL = layer.url; + createFeatureLayersFromDynamicMapService2(layer, featureServiceURL, layers, gdbVersion, index, onMapLayerAdd); + } + else + { + index += 1; + getAllFeatureLayers(index, featureLayers); + } + } + } + + private function createFeatureLayersFromDynamicMapService2(arcGISDynamicMapServiceLayer:ArcGISDynamicMapServiceLayer, featureServiceURL:String, layers:Array, + gdbVersion:String, index:int, onMapLayerAdd:Boolean):void + { + var atleastOneFeatureLayerAlreadyIncluded:Boolean; + var candidateFeatureLayers:Array = []; + for (var i:int = 0; i < layers.length; ) + { + if (isFeatureLayerPartOfOpList(featureServiceURL + "/" + layers[i].id, gdbVersion)) + { + atleastOneFeatureLayerAlreadyIncluded = true; + break; + } + else + { + if (!isLayerPartOfExcludeLayers(arcGISDynamicMapServiceLayer.name + "/" + layers[i].id)) { - arcGISDynamicMapServiceLayer.removeEventListener(LayerEvent.IS_IN_SCALE_RANGE_CHANGE, layer_isInScaleRangeChangeHandler); - arcGISDynamicMapServiceLayer.removeEventListener(FlexEvent.HIDE, layer_hideShowHandler); - arcGISDynamicMapServiceLayer.removeEventListener(FlexEvent.SHOW, layer_hideShowHandler); + candidateFeatureLayers.push(layers[i]); + } + i++; + } + } + if (!atleastOneFeatureLayerAlreadyIncluded && candidateFeatureLayers.length) + { + arcGISDynamicMapServiceLayer.removeEventListener(LayerEvent.IS_IN_SCALE_RANGE_CHANGE, layer_isInScaleRangeChangeHandler); + arcGISDynamicMapServiceLayer.removeEventListener(FlexEvent.HIDE, layer_hideShowHandler); + arcGISDynamicMapServiceLayer.removeEventListener(FlexEvent.SHOW, layer_hideShowHandler); - arcGISDynamicMapServiceLayer.addEventListener(LayerEvent.IS_IN_SCALE_RANGE_CHANGE, layer_isInScaleRangeChangeHandler); - arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.HIDE, layer_hideShowHandler); - arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.SHOW, layer_hideShowHandler); + arcGISDynamicMapServiceLayer.addEventListener(LayerEvent.IS_IN_SCALE_RANGE_CHANGE, layer_isInScaleRangeChangeHandler); + arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.HIDE, layer_hideShowHandler); + arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.SHOW, layer_hideShowHandler); - if (arcGISDynamicMapServiceLayer.visibleLayers) - { - arcGISDynamicMapServiceLayer.visibleLayers.removeEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); - arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); - } - visibleLayersChangeWatcher = ChangeWatcher.watch(arcGISDynamicMapServiceLayer, "visibleLayers", visibleLayersChange); - var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; - for each (var copyLayerInfo:LayerInfo in copyLayerInfos) - { - updateMinMaxScaleOnLayerInfos(copyLayerInfo, copyLayerInfos); - } + if (arcGISDynamicMapServiceLayer.visibleLayers) + { + arcGISDynamicMapServiceLayer.visibleLayers.removeEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); + arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); + } + visibleLayersChangeWatcher = ChangeWatcher.watch(arcGISDynamicMapServiceLayer, "visibleLayers", visibleLayersChange); + var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; + for each (var copyLayerInfo:LayerInfo in copyLayerInfos) + { + updateMinMaxScaleOnLayerInfos(copyLayerInfo, copyLayerInfos); + } + + var arr:Array = []; + var index1:int = 0; + parseCandidateFeatureLayers(index1, candidateFeatureLayers); - var arr:Array = []; - var index1:int = 0; - parseCandidateFeatureLayers(index1, candidateFeatureLayers); + var fLayerObject:Object; + function parseCandidateFeatureLayers(index1:int, candidateFeatureLayers:Array):void + { + if (index1 < candidateFeatureLayers.length) + { + fLayerObject = candidateFeatureLayers[index1]; - var fLayerObject:Object; - function parseCandidateFeatureLayers(index1:int, candidateFeatureLayers:Array):void + var featureLayerFromMap:FeatureLayer = getFeatureLayerFromMap(featureServiceURL + "/" + fLayerObject.id, gdbVersion); + var settingsKey:String = arcGISDynamicMapServiceLayer.name + "/" + fLayerObject.id; + if (!featureLayerFromMap) { - if (index1 < candidateFeatureLayers.length) - { - fLayerObject = candidateFeatureLayers[index1]; - - var featureLayerFromMap:FeatureLayer = getFeatureLayerFromMap(featureServiceURL + "/" + fLayerObject.id, gdbVersion); - var settingsKey:String = arcGISDynamicMapServiceLayer.name + "/" + fLayerObject.id; - if (!featureLayerFromMap) - { - var featureLayer:FeatureLayer = new FeatureLayer; - featureLayer.addEventListener(LayerEvent.LOAD, featureLayerLoadHandler); - featureLayer.addEventListener(LayerEvent.LOAD_ERROR, featureLayerLoadErrorHandler); - - featureLayer.name = "hiddenLayer_" + fLayerObject.name; - featureLayer.proxyURL = arcGISDynamicMapServiceLayer.proxyURL; - featureLayer.token = arcGISDynamicMapServiceLayer.token; - featureLayer.isEditable = featureLayerToSettings[settingsKey] ? featureLayerToSettings[settingsKey].isEditable : true; - featureLayer.url = featureServiceURL + "/" + fLayerObject.id; - hiddenFeatureLayerToSettingsName[featureLayer] = settingsKey; - updateFeatureLayerMinMaxScale(featureLayer, fLayerObject.id, copyLayerInfos); - } - else - { - featureLayerFromMap.addEventListener(FlexEvent.HIDE, featureLayer_hideShowHandler); - featureLayerFromMap.addEventListener(FlexEvent.SHOW, featureLayer_hideShowHandler); - featureLayerToDynamicMapService[featureLayerFromMap] = arcGISDynamicMapServiceLayer; - if (!onMapLayerAdd) - { - featureLayers.push(featureLayerFromMap); - } - else - { - featureLayers.unshift(featureLayerFromMap); - } - index1++; - hiddenFeatureLayerToSettingsName[featureLayerFromMap] = settingsKey; - parseCandidateFeatureLayers(index1, candidateFeatureLayers); - } - } - else - { - var indexOnMap:int = map.layerIds.indexOf(arcGISDynamicMapServiceLayer.id) + 1; - for each (var featLayer:FeatureLayer in arr.reverse()) - { - map.addLayer(featLayer, indexOnMap); - indexOnMap++; - } - arrFinalLayers.push(arcGISDynamicMapServiceLayer); - if (!onMapLayerAdd) - { - index = token.count + 1; - getAllFeatureLayers(index, featureLayers); - } - else - { - viewStack.removeAllChildren(); - for each (var fLayer:FeatureLayer in featureLayers) - { - createAttributeTableForFeatureLayer(fLayer); - addAttributeTableTab(fLayer); - } - viewStack.selectedIndex = 0; - } - } + var featureLayer:FeatureLayer = new FeatureLayer; + featureLayer.addEventListener(LayerEvent.LOAD, featureLayerLoadHandler); + featureLayer.addEventListener(LayerEvent.LOAD_ERROR, featureLayerLoadErrorHandler); + + featureLayer.name = "hiddenLayer_" + fLayerObject.name; + featureLayer.proxyURL = arcGISDynamicMapServiceLayer.proxyURL; + featureLayer.token = arcGISDynamicMapServiceLayer.token; + featureLayer.isEditable = featureLayerToSettings[settingsKey] ? featureLayerToSettings[settingsKey].isEditable : true; + featureLayer.url = featureServiceURL + "/" + fLayerObject.id; + hiddenFeatureLayerToSettingsName[featureLayer] = settingsKey; + updateFeatureLayerMinMaxScale(featureLayer, fLayerObject.id, copyLayerInfos); } - - function featureLayerLoadHandler(event:LayerEvent):void + else { - var loadedFeatureLayer:FeatureLayer = event.layer as FeatureLayer; - loadedFeatureLayer.addEventListener(FlexEvent.HIDE, featureLayer_hideShowHandler); - loadedFeatureLayer.addEventListener(FlexEvent.SHOW, featureLayer_hideShowHandler); - - loadedFeatureLayer.outFields = [ '*' ]; - loadedFeatureLayer.mode = FeatureLayer.MODE_SELECTION; - loadedFeatureLayer.gdbVersion = gdbVersion; - if (gdbVersion) - { - loadedFeatureLayer.name += "-" + gdbVersion; - } - if (arcGISDynamicMapServiceLayer.visible) - { - loadedFeatureLayer.visible = arcGISDynamicMapServiceLayer.visibleLayers ? isFeatureLayerVisible(fLayerObject.id, arcGISDynamicMapServiceLayer) : isFeatureLayerVisible(fLayerObject.id, arcGISDynamicMapServiceLayer, true); - } - else - { - loadedFeatureLayer.visible = false; - } - featureLayerToDynamicMapService[loadedFeatureLayer] = arcGISDynamicMapServiceLayer; + featureLayerFromMap.addEventListener(FlexEvent.HIDE, featureLayer_hideShowHandler); + featureLayerFromMap.addEventListener(FlexEvent.SHOW, featureLayer_hideShowHandler); + featureLayerToDynamicMapService[featureLayerFromMap] = arcGISDynamicMapServiceLayer; if (!onMapLayerAdd) { - featureLayers.push(loadedFeatureLayer); + featureLayers.push(featureLayerFromMap); } else { - featureLayers.unshift(loadedFeatureLayer); + featureLayers.unshift(featureLayerFromMap); } - arr.push(loadedFeatureLayer); index1++; + hiddenFeatureLayerToSettingsName[featureLayerFromMap] = settingsKey; parseCandidateFeatureLayers(index1, candidateFeatureLayers); } - - function featureLayerLoadErrorHandler(event:LayerEvent):void + } + else + { + var indexOnMap:int = map.layerIds.indexOf(arcGISDynamicMapServiceLayer.id) + 1; + for each (var featLayer:FeatureLayer in arr.reverse()) { - index1++; - parseCandidateFeatureLayers(index1, candidateFeatureLayers); + map.addLayer(featLayer, indexOnMap); + indexOnMap++; + } + arrFinalLayers.push(arcGISDynamicMapServiceLayer); + if (!onMapLayerAdd) + { + index += 1; + getAllFeatureLayers(index, featureLayers); + } + else + { + viewStack.removeAllChildren(); + for each (var fLayer:FeatureLayer in featureLayers) + { + createAttributeTableForFeatureLayer(fLayer); + addAttributeTableTab(fLayer); + } + viewStack.selectedIndex = 0; } } + } + + function featureLayerLoadHandler(event:LayerEvent):void + { + var loadedFeatureLayer:FeatureLayer = event.layer as FeatureLayer; + loadedFeatureLayer.addEventListener(FlexEvent.HIDE, featureLayer_hideShowHandler); + loadedFeatureLayer.addEventListener(FlexEvent.SHOW, featureLayer_hideShowHandler); + + loadedFeatureLayer.outFields = [ '*' ]; + loadedFeatureLayer.mode = FeatureLayer.MODE_SELECTION; + loadedFeatureLayer.gdbVersion = gdbVersion; + if (gdbVersion) + { + loadedFeatureLayer.name += "-" + gdbVersion; + } + if (arcGISDynamicMapServiceLayer.visible) + { + loadedFeatureLayer.visible = arcGISDynamicMapServiceLayer.visibleLayers ? isFeatureLayerVisible(fLayerObject.id, arcGISDynamicMapServiceLayer) : isFeatureLayerVisible(fLayerObject.id, arcGISDynamicMapServiceLayer, true); + } else { - index = token.count + 1; - getAllFeatureLayers(index, featureLayers); + loadedFeatureLayer.visible = false; + } + featureLayerToDynamicMapService[loadedFeatureLayer] = arcGISDynamicMapServiceLayer; + if (!onMapLayerAdd) + { + featureLayers.push(loadedFeatureLayer); } + else + { + featureLayers.unshift(loadedFeatureLayer); + } + arr.push(loadedFeatureLayer); + index1++; + parseCandidateFeatureLayers(index1, candidateFeatureLayers); } - else + + function featureLayerLoadErrorHandler(event:LayerEvent):void { - index = token.count + 1; - getAllFeatureLayers(index, featureLayers); + index1++; + parseCandidateFeatureLayers(index1, candidateFeatureLayers); } } - function jsonTask_faultHandler(fault:Fault, token:Object = null):void + else { - if (!onMapLayerAdd) - { - index = token.count + 1; - getAllFeatureLayers(index, featureLayers); - } + index += 1; + getAllFeatureLayers(index, featureLayers); } } From b233cc9ea4cc1daa1c000176ba79c637110cd96b Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 8 Apr 2013 10:51:02 -0700 Subject: [PATCH 13/54] Extract resource module locales to build.properties. --- build.properties | 3 ++ build.xml | 82 ++++++++++-------------------------------------- 2 files changed, 19 insertions(+), 66 deletions(-) diff --git a/build.properties b/build.properties index 7eef2e8..9288a39 100644 --- a/build.properties +++ b/build.properties @@ -10,3 +10,6 @@ fb.debug.dir=bin-debug # The name of the Flex Viewer project in the workspace set in local.properties fb.workspace.project.name=FlexViewer + +# Locales to create resource modules for +locale.modules=ar,da_DK,de_DE,en_US,es_ES,et_EE,fr_FR,he_IL,it_IT,ja_JP,ko_KR,lt_LT,lv_LV,nb_NO,nl_NL,pl_PL,pt_BR,pt_PT,ro_RO,ru_RU,sv_SE,zh_CN \ No newline at end of file diff --git a/build.xml b/build.xml index 3ce46b8..cf977f8 100644 --- a/build.xml +++ b/build.xml @@ -83,72 +83,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + From a0ae214525cfee98be78bf9c25ac88d5124fdbdf Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 8 Apr 2013 13:04:14 -0700 Subject: [PATCH 14/54] Fix 'resoure' typo. --- build.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index cf977f8..bf8b861 100644 --- a/build.xml +++ b/build.xml @@ -28,7 +28,7 @@ description="Runs Flash Builder"/> @@ -82,7 +82,7 @@ - + - + Date: Tue, 9 Apr 2013 11:47:40 -0700 Subject: [PATCH 15/54] make sure Edit Widget, Attribute Table Widget and TOC are in-sync when any layer visibility is changed --- .../components/toc/tocClasses/TocMapLayerItem.as | 4 ++-- .../AttributeTable/AttributeTableWidget.mxml | 14 ++++++++------ src/widgets/Edit/EditWidget.mxml | 15 ++++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as b/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as index 164ca39..9d9ac09 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as @@ -233,8 +233,8 @@ public class TocMapLayerItem extends TocItem { var actualVisibleLayers:Array = getActualVisibleLayers(ArcGISDynamicMapServiceLayer(layer).visibleLayers.toArray(), _dynamicMapServiceLayerInfos); for each (var child:TocLayerInfoItem in children) - { - updateTOCItemVisibility(child, ArcGISDynamicMapServiceLayer(layer).visibleLayers.toArray()); + { + updateTOCItemVisibility(child, actualVisibleLayers); } } diff --git a/src/widgets/AttributeTable/AttributeTableWidget.mxml b/src/widgets/AttributeTable/AttributeTableWidget.mxml index 7ec9837..e39a5cd 100644 --- a/src/widgets/AttributeTable/AttributeTableWidget.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidget.mxml @@ -49,7 +49,8 @@ import com.esri.ags.layers.supportClasses.Field; import com.esri.ags.layers.supportClasses.LayerInfo; import com.esri.ags.tasks.JSONTask; - + import com.esri.viewer.utils.MapServiceUtil; + import mx.binding.utils.ChangeWatcher; import mx.collections.ArrayCollection; import mx.containers.ViewStack; @@ -474,13 +475,14 @@ arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.HIDE, layer_hideShowHandler); arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.SHOW, layer_hideShowHandler); - if (arcGISDynamicMapServiceLayer.visibleLayers) - { - arcGISDynamicMapServiceLayer.visibleLayers.removeEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); - arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); + var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; + if (!arcGISDynamicMapServiceLayer.visibleLayers) + { + var visLayers:Array = getActualVisibleLayers(MapServiceUtil.getVisibleSubLayers(copyLayerInfos), copyLayerInfos); + arcGISDynamicMapServiceLayer.visibleLayers = new ArrayCollection(visLayers); } + arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); visibleLayersChangeWatcher = ChangeWatcher.watch(arcGISDynamicMapServiceLayer, "visibleLayers", visibleLayersChange); - var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; for each (var copyLayerInfo:LayerInfo in copyLayerInfos) { updateMinMaxScaleOnLayerInfos(copyLayerInfo, copyLayerInfos); diff --git a/src/widgets/Edit/EditWidget.mxml b/src/widgets/Edit/EditWidget.mxml index 28f107d..6367fc7 100644 --- a/src/widgets/Edit/EditWidget.mxml +++ b/src/widgets/Edit/EditWidget.mxml @@ -57,7 +57,8 @@ import com.esri.ags.tasks.GeometryServiceSingleton; import com.esri.ags.tasks.JSONTask; import com.esri.viewer.AppEvent; - + import com.esri.viewer.utils.MapServiceUtil; + import mx.binding.utils.ChangeWatcher; import mx.collections.ArrayCollection; import mx.core.FlexGlobals; @@ -538,13 +539,14 @@ arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.HIDE, layer_hideShowHandler); arcGISDynamicMapServiceLayer.addEventListener(FlexEvent.SHOW, layer_hideShowHandler); - if (arcGISDynamicMapServiceLayer.visibleLayers) - { - arcGISDynamicMapServiceLayer.visibleLayers.removeEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); - arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); + var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; + if (!arcGISDynamicMapServiceLayer.visibleLayers) + { + var visLayers:Array = getActualVisibleLayers(MapServiceUtil.getVisibleSubLayers(copyLayerInfos), copyLayerInfos); + arcGISDynamicMapServiceLayer.visibleLayers = new ArrayCollection(visLayers); } + arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler); visibleLayersChangeWatcher = ChangeWatcher.watch(arcGISDynamicMapServiceLayer, "visibleLayers", visibleLayersChange); - var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; for each (var copyLayerInfo:LayerInfo in copyLayerInfos) { updateMinMaxScaleOnLayerInfos(copyLayerInfo, copyLayerInfos); @@ -1185,7 +1187,6 @@ if (dynamicMapServiceLayer.visibleLayers && dynamicMapServiceLayer.visibleLayers.getItemIndex(featureLayerId) != -1) { dynamicMapServiceLayer.visibleLayers.removeItemAt(dynamicMapServiceLayer.visibleLayers.getItemIndex(featureLayerId)); - } } } From 2e43f80ffcd1674f97ecbbc4cd1781619c1233b1 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Wed, 3 Apr 2013 16:01:49 -0700 Subject: [PATCH 16/54] Add support for projecting center/extent from URL parameters. * Add support to specify WKID for center & extent URL parameters. * Project center/initial extent if needed. * Extract logic for parsing center map point. --- src/com/esri/viewer/managers/MapManager.mxml | 158 ++++++++++++++++--- 1 file changed, 140 insertions(+), 18 deletions(-) diff --git a/src/com/esri/viewer/managers/MapManager.mxml b/src/com/esri/viewer/managers/MapManager.mxml index 4306014..17c5702 100644 --- a/src/com/esri/viewer/managers/MapManager.mxml +++ b/src/com/esri/viewer/managers/MapManager.mxml @@ -64,8 +64,11 @@ Class used to configure the viewer map component (including layers) and handle m import com.esri.ags.symbols.SimpleMarkerSymbol; import com.esri.ags.symbols.Symbol; import com.esri.ags.symbols.TextSymbol; + import com.esri.ags.tasks.GeometryServiceSingleton; + import com.esri.ags.tasks.supportClasses.ProjectParameters; import com.esri.ags.tools.DrawTool; import com.esri.ags.tools.NavigationTool; + import com.esri.ags.utils.WebMercatorUtil; import com.esri.viewer.AppEvent; import com.esri.viewer.ConfigData; import com.esri.viewer.IBaseWidget; @@ -137,6 +140,8 @@ Class used to configure the viewer map component (including layers) and handle m private var m_drawEndFunction:Function; + private var m_initialExtent:Extent; + private var m_fullExtent:Extent; private var m_mapManagerState:String = "resized"; @@ -265,7 +270,6 @@ Class used to configure the viewer map component (including layers) and handle m private function configMapAttributes():void { var spatialReference:SpatialReference; - var initialExtent:Extent; for (var i:int = 0; i < m_configData.mapAttrs.length; i++) { @@ -279,7 +283,8 @@ Class used to configure the viewer map component (including layers) and handle m else if (id == "initial") { var initExtentTextCoordinates:String = m_configData.mapAttrs[i].extent; - initialExtent = createExtent(initExtentTextCoordinates.split(" ")); + m_initialExtent = createExtent(initExtentTextCoordinates.split(" ")); + map.addEventListener(MapEvent.LOAD, map_loadHandler); } else if (id == "center") { @@ -381,32 +386,48 @@ Class used to configure the viewer map component (including layers) and handle m { m_fullExtent.spatialReference = spatialReference; } - if (initialExtent) + if (m_initialExtent && !m_initialExtent.spatialReference) { - initialExtent.spatialReference = spatialReference; - map.extent = initialExtent; + m_initialExtent.spatialReference = spatialReference; } } - private function createExtent(extentTextCoordinates:Array):Extent + private function createExtent(textualExtentAttributes:Array):Extent { - if (extentTextCoordinates && extentTextCoordinates.length == 4) + if (textualExtentAttributes && textualExtentAttributes.length >= 4) { - var xMin:Number = parseFloat(extentTextCoordinates[0]); - var yMin:Number = parseFloat(extentTextCoordinates[1]); - var xMax:Number = parseFloat(extentTextCoordinates[2]); - var yMax:Number = parseFloat(extentTextCoordinates[3]); + var xMin:Number = parseFloat(textualExtentAttributes[0]); + var yMin:Number = parseFloat(textualExtentAttributes[1]); + var xMax:Number = parseFloat(textualExtentAttributes[2]); + var yMax:Number = parseFloat(textualExtentAttributes[3]); + + if (textualExtentAttributes.length == 5) + { + var wkid:Number = parseFloat(textualExtentAttributes[4]); + } } var canCreateExtent:Boolean = !isNaN(xMin) && !isNaN(yMin) && !isNaN(xMax) && !isNaN(yMax); - return canCreateExtent ? new Extent(xMin, yMin, xMax, yMax) : null; + var extent:Extent; + if (canCreateExtent) + { + extent = new Extent(xMin, yMin, xMax, yMax); + if (!isNaN(wkid)) + { + extent.spatialReference = new SpatialReference(wkid); + } + } + + return extent; } private function map_loadHandler(event:MapEvent):void { + map.removeEventListener(MapEvent.LOAD, map_loadHandler); + var center:String; var level:Number; var scale:Number; @@ -429,15 +450,46 @@ Class used to configure the viewer map component (including layers) and handle m } if (center) { - var centerXY:Array = center.split(" "); - if (centerXY.length == 2) + var centerPoint:MapPoint = createMapPoint(center.split(" ")); + if (centerPoint) { - var centerX:Number = parseFloat(centerXY[0]); - var centerY:Number = parseFloat(centerXY[1]); + if (canApplyDirectlyToMap(centerPoint.spatialReference)) + { + applyCenterProperties(centerPoint); + } + else if (map.spatialReference.isWebMercator() + && centerPoint.spatialReference.wkid == 4326) + { + applyCenterProperties(WebMercatorUtil.geographicToWebMercator(centerPoint) as MapPoint); + } + else if (map.spatialReference.wkid == 4326 + && centerPoint.spatialReference.isWebMercator()) + { + applyCenterProperties(WebMercatorUtil.webMercatorToGeographic(centerPoint) as MapPoint); + } + else + { + var centerProjectParams:ProjectParameters = new ProjectParameters(); + centerProjectParams.geometries = [ centerPoint ]; + centerProjectParams.outSpatialReference = map.spatialReference; + GeometryServiceSingleton.instance.project( + centerProjectParams, new AsyncResponder(centerProjectionSuccessHandler, + centerProjectionFailureHandler)); + + function centerProjectionSuccessHandler(geometries:Array, token:Object = null):void + { + applyCenterProperties(geometries[0]); + } - if (!isNaN(centerX) && !isNaN(centerY)) + function centerProjectionFailureHandler(fault:Fault, token:Object = null):void + { + //ignore error + } + } + + function applyCenterProperties(center:MapPoint):void { - map.centerAt(new MapPoint(centerX, centerY)); + map.centerAt(center); if (scale > 0) { map.scale = scale; @@ -449,6 +501,76 @@ Class used to configure the viewer map component (including layers) and handle m } } } + else if (m_initialExtent) + { + if (canApplyDirectlyToMap(m_initialExtent.spatialReference)) + { + map.extent = m_initialExtent; + } + else if (map.spatialReference.isWebMercator() + && m_initialExtent.spatialReference.wkid == 4326) + { + map.extent = WebMercatorUtil.geographicToWebMercator(m_initialExtent) as Extent; + } + else if (map.spatialReference.wkid == 4326 + && m_initialExtent.spatialReference.isWebMercator()) + { + map.extent = WebMercatorUtil.webMercatorToGeographic(m_initialExtent) as Extent; + } + else + { + var extentProjectParams:ProjectParameters = new ProjectParameters(); + extentProjectParams.geometries = [ m_initialExtent ]; + extentProjectParams.outSpatialReference = map.spatialReference; + GeometryServiceSingleton.instance.project( + extentProjectParams, new AsyncResponder(extentProjectionSuccessHandler, + extentProjectionFailureHandler)); + + function extentProjectionSuccessHandler(geometries:Array, token:Object = null):void + { + map.extent = geometries[0]; + } + + function extentProjectionFailureHandler(fault:Fault, token:Object = null):void + { + //ignore error + } + } + } + + function canApplyDirectlyToMap(spatialReference:SpatialReference):Boolean + { + return !spatialReference + || map.spatialReference.equals(spatialReference) + || (map.spatialReference.isWebMercator() && spatialReference.isWebMercator()); + } + } + + private function createMapPoint(textualMapPointAttributes:Array):MapPoint + { + var point:MapPoint; + + if (textualMapPointAttributes.length >= 2) + { + var pointX:Number = parseFloat(textualMapPointAttributes[0]); + var pointY:Number = parseFloat(textualMapPointAttributes[1]); + + if (textualMapPointAttributes.length == 3) + { + var wkid:Number = parseFloat(textualMapPointAttributes[2]); + } + + if (!isNaN(pointX) && !isNaN(pointY)) + { + point = new MapPoint(pointX, pointY); + if (!isNaN(wkid)) + { + point.spatialReference = new SpatialReference(wkid); + } + } + } + + return point; } private function configBasemaps():void From 2f1d00be2b0323141ca70316d0f46ca6e77681e4 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 9 Apr 2013 11:41:30 -0700 Subject: [PATCH 17/54] Clean up. --- src/com/esri/viewer/managers/MapManager.mxml | 138 ++++++++----------- 1 file changed, 56 insertions(+), 82 deletions(-) diff --git a/src/com/esri/viewer/managers/MapManager.mxml b/src/com/esri/viewer/managers/MapManager.mxml index 17c5702..cead3c5 100644 --- a/src/com/esri/viewer/managers/MapManager.mxml +++ b/src/com/esri/viewer/managers/MapManager.mxml @@ -39,6 +39,7 @@ Class used to configure the viewer map component (including layers) and handle m import com.esri.ags.events.LayerEvent; import com.esri.ags.events.MapEvent; import com.esri.ags.geometry.Extent; + import com.esri.ags.geometry.Geometry; import com.esri.ags.geometry.MapPoint; import com.esri.ags.layers.ArcGISDynamicMapServiceLayer; import com.esri.ags.layers.ArcGISTiledMapServiceLayer; @@ -453,97 +454,70 @@ Class used to configure the viewer map component (including layers) and handle m var centerPoint:MapPoint = createMapPoint(center.split(" ")); if (centerPoint) { - if (canApplyDirectlyToMap(centerPoint.spatialReference)) - { - applyCenterProperties(centerPoint); - } - else if (map.spatialReference.isWebMercator() - && centerPoint.spatialReference.wkid == 4326) - { - applyCenterProperties(WebMercatorUtil.geographicToWebMercator(centerPoint) as MapPoint); - } - else if (map.spatialReference.wkid == 4326 - && centerPoint.spatialReference.isWebMercator()) - { - applyCenterProperties(WebMercatorUtil.webMercatorToGeographic(centerPoint) as MapPoint); - } - else - { - var centerProjectParams:ProjectParameters = new ProjectParameters(); - centerProjectParams.geometries = [ centerPoint ]; - centerProjectParams.outSpatialReference = map.spatialReference; - GeometryServiceSingleton.instance.project( - centerProjectParams, new AsyncResponder(centerProjectionSuccessHandler, - centerProjectionFailureHandler)); - - function centerProjectionSuccessHandler(geometries:Array, token:Object = null):void - { - applyCenterProperties(geometries[0]); - } - - function centerProjectionFailureHandler(fault:Fault, token:Object = null):void - { - //ignore error - } - } - - function applyCenterProperties(center:MapPoint):void - { - map.centerAt(center); - if (scale > 0) - { - map.scale = scale; - } - else if (level >= 0) - { - map.level = level; - } - } + projectAndApply(centerPoint, + function applyCenterProperties(center:MapPoint):void + { + map.centerAt(center); + if (scale > 0) + { + map.scale = scale; + } + else if (level >= 0) + { + map.level = level; + } + }); } } else if (m_initialExtent) { - if (canApplyDirectlyToMap(m_initialExtent.spatialReference)) - { - map.extent = m_initialExtent; - } - else if (map.spatialReference.isWebMercator() - && m_initialExtent.spatialReference.wkid == 4326) - { - map.extent = WebMercatorUtil.geographicToWebMercator(m_initialExtent) as Extent; - } - else if (map.spatialReference.wkid == 4326 - && m_initialExtent.spatialReference.isWebMercator()) + projectAndApply(m_initialExtent, + function applyExtentProperties(extent:Extent):void + { + map.extent = extent; + }); + } + } + + private function projectAndApply(geometry:Geometry, resultHandler:Function):void + { + var canApplyDirectlyToMap:Boolean = !geometry.spatialReference + || map.spatialReference.equals(geometry.spatialReference) + || (map.spatialReference.isWebMercator() && geometry.spatialReference.isWebMercator()); + + if (canApplyDirectlyToMap) + { + resultHandler(geometry); + } + else if (map.spatialReference.isWebMercator() + && geometry.spatialReference.wkid == 4326) + { + resultHandler(WebMercatorUtil.geographicToWebMercator(geometry)); + } + else if (map.spatialReference.wkid == 4326 + && geometry.spatialReference.isWebMercator()) + { + resultHandler(WebMercatorUtil.webMercatorToGeographic(geometry)); + } + else + { + var projectParams:ProjectParameters = new ProjectParameters(); + projectParams.geometries = [ geometry ]; + projectParams.outSpatialReference = map.spatialReference; + GeometryServiceSingleton.instance.project( + projectParams, new AsyncResponder(projectionSuccessHandler, + projectionFailureHandler)); + + function projectionSuccessHandler(geometries:Array, token:Object = null):void { - map.extent = WebMercatorUtil.webMercatorToGeographic(m_initialExtent) as Extent; + resultHandler(geometries[0]); } - else - { - var extentProjectParams:ProjectParameters = new ProjectParameters(); - extentProjectParams.geometries = [ m_initialExtent ]; - extentProjectParams.outSpatialReference = map.spatialReference; - GeometryServiceSingleton.instance.project( - extentProjectParams, new AsyncResponder(extentProjectionSuccessHandler, - extentProjectionFailureHandler)); - - function extentProjectionSuccessHandler(geometries:Array, token:Object = null):void - { - map.extent = geometries[0]; - } - function extentProjectionFailureHandler(fault:Fault, token:Object = null):void - { - //ignore error - } + function projectionFailureHandler(fault:Fault, token:Object = null):void + { + //ignore error } } - - function canApplyDirectlyToMap(spatialReference:SpatialReference):Boolean - { - return !spatialReference - || map.spatialReference.equals(spatialReference) - || (map.spatialReference.isWebMercator() && spatialReference.isWebMercator()); - } } private function createMapPoint(textualMapPointAttributes:Array):MapPoint From 9b8c844cf87853e86c949eeb977a2f487795ef28 Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Tue, 9 Apr 2013 14:51:29 -0700 Subject: [PATCH 18/54] don't uncheck parent(group) layers when unchecking sublayers --- src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as b/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as index 9d9ac09..5832440 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as @@ -242,7 +242,6 @@ public class TocMapLayerItem extends TocItem { if (item.isGroupLayer()) { - item.visible = actualVisibleLayers.indexOf(item.layerInfo.layerId) != -1; if (item.visible) { for each (var child:TocLayerInfoItem in item.children) From 16752b81f98fcbeac0860b7c4bf9b2674ab95adb Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Wed, 10 Apr 2013 10:25:28 -0700 Subject: [PATCH 19/54] Update Italian localization strings --- locale/it_IT/ViewerStrings.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/it_IT/ViewerStrings.properties b/locale/it_IT/ViewerStrings.properties index b80c1f9..a0cca15 100644 --- a/locale/it_IT/ViewerStrings.properties +++ b/locale/it_IT/ViewerStrings.properties @@ -307,8 +307,8 @@ clearButtonLabel=Mostra tutto featuresFoundLabel=Feature trovate: {0} -drivingDirectionLabel=Direzioni di guida -routeSubmitLabel=Ottieni direzioni +drivingDirectionLabel=Indicazioni stradali +routeSubmitLabel=Ottieni indicazioni moveUpTooltip=Sposta su moveDownTooltip=Sposta giù addLocationTooltip=Fare clic sulla mappa per aggiungere una posizione From c2d665fd5d6ddf26a6ddc71c3f8eb559e18e751e Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 9 Apr 2013 17:48:22 -0700 Subject: [PATCH 20/54] Allow print tasks with no formats or layout templates. --- src/widgets/Print/ExportWebMapForm.mxml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/widgets/Print/ExportWebMapForm.mxml b/src/widgets/Print/ExportWebMapForm.mxml index 55c8005..257aaa8 100644 --- a/src/widgets/Print/ExportWebMapForm.mxml +++ b/src/widgets/Print/ExportWebMapForm.mxml @@ -346,7 +346,7 @@ layoutTemplateWhitelist.push(layoutTemplateXML.toString()); } - if (layoutTemplateWhitelist.length > 0) + if (layoutTemplates && layoutTemplateWhitelist.length > 0) { var totalLayoutTemplates:int = layoutTemplates.length; var layoutTemplate:String; @@ -383,13 +383,15 @@ layoutTemplatesDDL.selectedItem = printParameters.layoutTemplate; } - layoutTemplatesDDL.typicalItem = LabelUtil.findLongestLabelItem(layoutTemplates.toArray()); + if (shouldShowTemplateOptions) + { + layoutTemplatesDDL.typicalItem = LabelUtil.findLongestLabelItem(layoutTemplates.toArray()); + } } private function isContained(item:*, list:IList):Boolean { - var listContents:Array = list.toArray(); - return listContents.indexOf(item) > -1; + return list && list.getItemIndex(item) > -1; } private function initFormats(serviceInfo:PrintServiceInfo):void @@ -406,7 +408,7 @@ formatTemplateWhitelist.push(formatXML.toString()); } - if (formatTemplateWhitelist.length > 0) + if (formats && formatTemplateWhitelist.length > 0) { var totalFormats:int = formats.length; var format:String; @@ -443,7 +445,10 @@ formatsDDL.selectedItem = printParameters.format; } - formatsDDL.typicalItem = LabelUtil.findLongestLabelItem(formats.toArray()); + if (shouldShowFormatOptions) + { + formatsDDL.typicalItem = LabelUtil.findLongestLabelItem(formats.toArray()); + } } private function printTask_jobCompleteHandler(event:PrintEvent):void From 3b0ad02de03e7252d13e61978b97cb8389683cb2 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Wed, 10 Apr 2013 15:49:14 -0700 Subject: [PATCH 21/54] Fix expand layer items. --- src/com/esri/viewer/components/toc/TOC.as | 76 ++++++++++++++++--- .../components/toc/tocClasses/TocItem.as | 17 +++++ src/widgets/LayerList/LayerListWidget.mxml | 5 +- .../MapSwitcher/MapSwitcherWidget.mxml | 5 +- 4 files changed, 83 insertions(+), 20 deletions(-) diff --git a/src/com/esri/viewer/components/toc/TOC.as b/src/com/esri/viewer/components/toc/TOC.as index b5de39b..c74b726 100644 --- a/src/com/esri/viewer/components/toc/TOC.as +++ b/src/com/esri/viewer/components/toc/TOC.as @@ -109,12 +109,49 @@ public class TOC extends Tree // include legend items private var _includeLegendItems:Boolean; + private var _expandLayerItemsPending:Boolean; + private var _pendingItemsToExpand:Array = []; + //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- + //-------------------------------------------------------------------------- + // expandLayerItems + //-------------------------------------------------------------------------- + + [Bindable("expandLayerItemsChanged")] + private var _expandLayerItems:Boolean; + + public function get expandLayerItems():Boolean + { + return _expandLayerItems; + } + + public function set expandLayerItems(value:Boolean):void + { + if (value != _expandLayerItems) + { + _expandLayerItems = value; + _expandLayerItemsPending = true; + + if (_expandLayerItems) + { + //need to expand all current TOC items + _pendingItemsToExpand = _pendingItemsToExpand.concat(_tocRoots.source); + } + else + { + _pendingItemsToExpand.length = 0; + } + + invalidateProperties(); + dispatchEvent(new Event("expandLayerItemsChanged")); + } + } + //-------------------------------------------------------------------------- // map //-------------------------------------------------------------------------- @@ -367,6 +404,15 @@ public class TOC extends Tree setLayerFadeEffect(layer); }); } + + if (_expandLayerItemsPending) + { + _expandLayerItemsPending = false; + if (expandLayerItems) + { + expandPendingItems(); + } + } } //-------------------------------------------------------------------------- @@ -375,21 +421,15 @@ public class TOC extends Tree // //-------------------------------------------------------------------------- - public function expandLayerItems():void + private function expandPendingItems():void { - validateNow(); - expandTocItems(_tocRoots); - } - - private function expandTocItems(tocItems:ArrayCollection):void - { - for each (var tocItem:TocItem in tocItems) + if (_pendingItemsToExpand.length > 0) { - if (tocItem.isGroupLayer()) + for each (var tocItem:TocItem in _pendingItemsToExpand) { - expandTocItems(tocItem.children); - expandItem(tocItem, true); + expandChildrenOf(tocItem, true); } + _pendingItemsToExpand.length = 0; } } @@ -603,7 +643,8 @@ public class TOC extends Tree var item:Object = _tocRoots[i]; if (item is TocMapLayerItem && TocMapLayerItem(item).layer === layer) { - _tocRoots.removeItemAt(i); + var tocItem:TocItem = _tocRoots.removeItemAt(i) as TocItem; + tocItem.removeEventListener(Event.CHANGE, tocItem_childAddedHandler); break; } } @@ -638,6 +679,7 @@ public class TOC extends Tree } var tocItem:TocMapLayerItem = new TocMapLayerItem(layer, _labelFunction, _isMapServiceOnly, _includeLegendItems); + tocItem.addEventListener(Event.CHANGE, tocItem_childAddedHandler, false, 0, true); // need to get the true index of this layer in the map, removing any graphics layers from the equation if necessary as well as any exclude layers var trueMapLayerIndex:Number = 0; for each (var mapLayer:Layer in this.map.layers) @@ -656,6 +698,16 @@ public class TOC extends Tree _tocRoots.addItemAt(tocItem, _tocRoots.length - trueMapLayerIndex); } + private function tocItem_childAddedHandler(event:Event):void + { + if (expandLayerItems) + { + _expandLayerItemsPending = true; + _pendingItemsToExpand.push(event.currentTarget as TocItem); + invalidateProperties(); + } + } + private function setLayerFadeEffect(layer:Layer):void { if (useLayerFadeEffect) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocItem.as b/src/com/esri/viewer/components/toc/tocClasses/TocItem.as index 43ac992..eaf9c5d 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocItem.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocItem.as @@ -16,6 +16,7 @@ package com.esri.viewer.components.toc.tocClasses { +import flash.events.Event; import flash.events.EventDispatcher; import mx.collections.ArrayCollection; @@ -80,6 +81,7 @@ public class TocItem extends EventDispatcher children = new ArrayCollection(); } children.addItem(item); + getTopMostTocItem().dispatchEvent(new Event(Event.CHANGE)); } //-------------------------------------------------------------------------- @@ -283,6 +285,21 @@ public class TocItem extends EventDispatcher return result; } + /** + * Gets top-most TOC item. + */ + protected function getTopMostTocItem():TocItem + { + var topMostTocItem:TocItem; + var currentTocItem:TocItem = this; + while (currentTocItem != null) + { + topMostTocItem = currentTocItem; + currentTocItem = currentTocItem.parent; + } + return topMostTocItem; + } + /** * Updates the indeterminate visibility state of this TOC item. */ diff --git a/src/widgets/LayerList/LayerListWidget.mxml b/src/widgets/LayerList/LayerListWidget.mxml index 37c6b88..4c00816 100644 --- a/src/widgets/LayerList/LayerListWidget.mxml +++ b/src/widgets/LayerList/LayerListWidget.mxml @@ -75,10 +75,7 @@ toc.basemapLayers = getBasemapLayers(); toc.excludeGraphicsLayers = true; toc.includeLegendItems = includeLegendItems; - if (expandLayerItems) - { - toc.expandLayerItems(); - } + toc.expandLayerItems = expandLayerItems; } private function getExcludeLayers():ArrayCollection diff --git a/src/widgets/MapSwitcher/MapSwitcherWidget.mxml b/src/widgets/MapSwitcher/MapSwitcherWidget.mxml index eec6416..3d4ef45 100644 --- a/src/widgets/MapSwitcher/MapSwitcherWidget.mxml +++ b/src/widgets/MapSwitcher/MapSwitcherWidget.mxml @@ -175,13 +175,10 @@ toc.basemapLayers = getBasemapLayers(); toc.excludeGraphicsLayers = true; toc.includeLegendItems = includeLegendItems; - if (expandLayerItems) - { - toc.expandLayerItems(); - } var tocLayers:ArrayCollection = toc.dataProvider as ArrayCollection; opLayersButton.visible = tocLayers.length ? true : false; tocLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, toc_collectionChangeHandler); + toc.expandLayerItems = expandLayerItems; } private function toc_collectionChangeHandler(event:CollectionEvent):void From 3c7cbc05b6f62cb393c4455e93ac2b1ff5ad9d04 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Wed, 10 Apr 2013 14:54:25 -0700 Subject: [PATCH 22/54] Clean up. --- src/com/esri/viewer/components/toc/TOC.as | 1 - .../esri/viewer/components/toc/tocClasses/TocItem.as | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/com/esri/viewer/components/toc/TOC.as b/src/com/esri/viewer/components/toc/TOC.as index c74b726..e695edb 100644 --- a/src/com/esri/viewer/components/toc/TOC.as +++ b/src/com/esri/viewer/components/toc/TOC.as @@ -69,7 +69,6 @@ public class TOC extends Tree // Set default styles setStyle("borderStyle", "none"); - } //-------------------------------------------------------------------------- diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocItem.as b/src/com/esri/viewer/components/toc/tocClasses/TocItem.as index eaf9c5d..53796fb 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocItem.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocItem.as @@ -275,14 +275,8 @@ public class TocItem extends EventDispatcher */ public function isGroupLayer():Boolean { - var result:Boolean; - - if (children && children.length > 0) - { - result = children.getItemAt(0) is TocLegendItem ? false : true; - } - - return result; + return children && children.length > 0 + && !(children.getItemAt(0) is TocLegendItem); } /** From 459d5f09fdce249376d8d12883c15e89b836b5b3 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Wed, 10 Apr 2013 16:14:55 -0700 Subject: [PATCH 23/54] Updated Estonian and Lithuanian --- locale/et_EE/ViewerStrings.properties | 30 +++++++++++++-------------- locale/lt_LT/ViewerStrings.properties | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/locale/et_EE/ViewerStrings.properties b/locale/et_EE/ViewerStrings.properties index dbf5022..7ef79a1 100644 --- a/locale/et_EE/ViewerStrings.properties +++ b/locale/et_EE/ViewerStrings.properties @@ -219,10 +219,10 @@ fillOutlineWidthLabel=Laius -showMeasurementsLabel=Näita mõõdistusi +showMeasurementsLabel=Näita mõõtmisi distanceUnitsLabel=Vahemaa ühikud -areaUnitsLabel=Ala ühikud -areaLabel=Ala: +areaUnitsLabel=Pindala ühikud +areaLabel=Pindala: perimeterLabel=Ümbermõõt: lengthLabel=Pikkus: @@ -246,13 +246,13 @@ extractButtonLabel=Tee väljavõte step1ErrorLabel=Palun valige huvipiirkond. step2ErrorLabel=Palun valige väljavõtte kihid. emptyResultsLabel=Ülesanne lõpetatud edukalt, kuid ei tagastanud ühtegi tulemust. -saveDataFileLabel=Fail andmetega loodud. Kas te soovite seda alla laadida? +saveDataFileLabel=Fail andmetega on loodud. Kas soovite seda alla laadida? attributesLabel=Atribuudid attachmentsLabel=Manused relatedRecordsLabel=Seotud kirjed -featureLayerOutOfScaleText=Objektikiht on väljaspool skaala vahemikku +featureLayerOutOfScaleText=Objektikiht on väljaspool nähtavusvahemikku showAttachmentsText=Manused showRelatedRecordsText=Seotud kirjed showAttributesText=Mine tagasi @@ -284,7 +284,7 @@ requiredFields=Nõutud väljad: requiredField=Nõutud väli: deleteResultTooltip=Kustuta tulemus resultScoreText=Sobivus: -bingResultConfidenceText=Kindlus: +bingResultConfidenceText=Usaldus: printSubmitLabel=Prindi @@ -295,25 +295,25 @@ printTitleLabel=Pealkiri printSubtitleLabel=Alampealkiri printCopyrightLabel=Autoriõigused printAuthorLabel=Autor -printLayoutTemplatesLabel=Asetuse mallid +printLayoutTemplatesLabel=Kujunduse mallid printFormatsLabel=Formaadid -printScaleLabel=Kasuta seda skaalat +printScaleLabel=Kasuta seda mõõtkava filterTitleBarTooltip=Filtreeri tulemusi -showallTitleBarTooltip=Näita kõiki +showallTitleBarTooltip=Kuva kõiki filterButtonLabel=Filtreeri -clearButtonLabel=Näita kõiki -featuresFoundLabel=Objekte leitud: {0} +clearButtonLabel=Kuva kõiki +featuresFoundLabel=Leitud objekte: {0} -drivingDirectionLabel=Marsruut -routeSubmitLabel=Hangi marsruut +drivingDirectionLabel=Marsruutimise juhised +routeSubmitLabel=Hangi juhised moveUpTooltip=Liiguta üles moveDownTooltip=Liiguta alla addLocationTooltip=asukoha lisamiseks kliki kaardil optionsLabel=Seaded -bestSequenceLabel=Leia parim jada +bestSequenceLabel=Leia parim järjekord milesLabel=Miili metricLabel=km changeRouteSymbolLabel=Muuda marsruudi sümbolit @@ -363,4 +363,4 @@ drawToolMenuLabel=Vali joonistamise tööriist selectLabel=Vali noLayersLabel=Kihid puuduvad noChartDataToDisplayLabel=Andmed diagrammi kuvamiseks puuduvad -featureLayerNotVisibleText=objektikiht ei ole nähtav või ei kuulu skaala vahemikku \ No newline at end of file +featureLayerNotVisibleText=objektikiht ei ole nähtav või ei kuulu nähtavusvahemikku \ No newline at end of file diff --git a/locale/lt_LT/ViewerStrings.properties b/locale/lt_LT/ViewerStrings.properties index e9dffe4..630bd34 100644 --- a/locale/lt_LT/ViewerStrings.properties +++ b/locale/lt_LT/ViewerStrings.properties @@ -363,4 +363,4 @@ drawToolMenuLabel=Pasirinkite įrankį selectLabel=Išrinkti noLayersLabel=Nėra sluoksnių noChartDataToDisplayLabel=Nėra atvaizduotinų duomenų -featureLayerNotVisibleText=elementų sluoksnis išjungtas arba nepasiekiamas šiame mastelyje \ No newline at end of file +featureLayerNotVisibleText=elementų sluoksnis išjungtas arba šiame mastelyje nerodomas \ No newline at end of file From b09fd72e19b344a051069d8411d4b56d38e89a1b Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Wed, 10 Apr 2013 18:29:32 -0700 Subject: [PATCH 24/54] Localization updates for 3.3 --- locale/ar/ViewerStrings.properties | 4 ++-- locale/da_DK/ViewerStrings.properties | 4 ++-- locale/de_DE/ViewerStrings.properties | 4 ++-- locale/es_ES/ViewerStrings.properties | 4 ++-- locale/et_EE/ViewerStrings.properties | 4 ++-- locale/fr_FR/ViewerStrings.properties | 4 ++-- locale/he_IL/ViewerStrings.properties | 4 ++-- locale/it_IT/ViewerStrings.properties | 4 ++-- locale/ja_JP/ViewerStrings.properties | 4 ++-- locale/ko_KR/ViewerStrings.properties | 4 ++-- locale/lt_LT/ViewerStrings.properties | 4 ++-- locale/lv_LV/ViewerStrings.properties | 4 ++-- locale/nb_NO/ViewerStrings.properties | 4 ++-- locale/nl_NL/ViewerStrings.properties | 4 ++-- locale/pl_PL/ViewerStrings.properties | 4 ++-- locale/pt_BR/ViewerStrings.properties | 4 ++-- locale/pt_PT/ViewerStrings.properties | 4 ++-- locale/ro_RO/ViewerStrings.properties | 4 ++-- locale/ru_RU/ViewerStrings.properties | 4 ++-- locale/sv_SE/ViewerStrings.properties | 4 ++-- locale/zh_CN/ViewerStrings.properties | 4 ++-- 21 files changed, 42 insertions(+), 42 deletions(-) diff --git a/locale/ar/ViewerStrings.properties b/locale/ar/ViewerStrings.properties index c6a23e0..5fc45ce 100644 --- a/locale/ar/ViewerStrings.properties +++ b/locale/ar/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=حول ArcGIS Viewer for Flex... -aboutText=هذا التطبيق يستخدم الإصدار 3.2 من ArcGIS Viewer for Flex. +aboutText=هذا التطبيق يستخدم ArcGIS Viewer 3.3 لـ Flex. aboutLearnMoreBtn=تعلم المزيد aboutCloseBtn=إغلاق @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=الوصف tocMapLayerDownloadLabel=تحميل -incorrectLayerTypeText={0} ليس نوع طبقة معتمد. استخدم "arcims" أو "bing" أو "csv" أو "dynamic" أو "feature" أو "georss" أو "image" أو "kml" أو "osm" أو "tiled" أو "wms" أو "wmts" بدلاً منه. +incorrectLayerTypeText={0} ليس نوع طبقة معتمد. استخدم "arcims" أو "bing" أو "csv" أو "dynamic" أو "feature" أو "georss" أو "image" أو "kml" أو "osm" أو "tiled" أو "webtiled" أو "wms" أو "wmts" بدلاً منه. missingConfigFileText=تعذر العثور على {0} diff --git a/locale/da_DK/ViewerStrings.properties b/locale/da_DK/ViewerStrings.properties index dda70c7..fce072e 100644 --- a/locale/da_DK/ViewerStrings.properties +++ b/locale/da_DK/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Om ArcGIS Viewer for Flex... -aboutText=Denne applikation bruger ArcGIS Viewer for Flex version 3.2. +aboutText=Denne applikation bruger ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Lær mere aboutCloseBtn=Luk @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Beskrivelse tocMapLayerDownloadLabel=Download -incorrectLayerTypeText={0} er ikke en understøttet lagtype. Brug "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" eller "wmts" i stedet for. +incorrectLayerTypeText={0} er ikke en understøttet lagtype. Brug "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" eller "wmts" i stedet for. missingConfigFileText=Kunne ikke finde {0} diff --git a/locale/de_DE/ViewerStrings.properties b/locale/de_DE/ViewerStrings.properties index c583049..f9c0708 100644 --- a/locale/de_DE/ViewerStrings.properties +++ b/locale/de_DE/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Info zu ArcGIS Viewer for Flex... -aboutText=Diese Anwendung verwendet die Version 3.2 von ArcGIS Viewer for Flex. +aboutText=Diese Anwendung verwendet ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Weitere Informationen aboutCloseBtn=Schließen @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Beschreibung tocMapLayerDownloadLabel=Herunterladen -incorrectLayerTypeText={0} ist kein unterstützter Layer-Typ. Verwenden Sie stattdessen "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" oder "wmts". +incorrectLayerTypeText={0} ist kein unterstützter Layer-Typ. Verwenden Sie stattdessen "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" oder "wmts". missingConfigFileText={0} konnte nicht gefunden werden diff --git a/locale/es_ES/ViewerStrings.properties b/locale/es_ES/ViewerStrings.properties index c142ce3..77c8cd5 100644 --- a/locale/es_ES/ViewerStrings.properties +++ b/locale/es_ES/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Acerca de ArcGIS Viewer for Flex... -aboutText=Esta aplicación utiliza ArcGIS Viewer for Flex versión 3.2. +aboutText=Esta aplicación utiliza ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Más información aboutCloseBtn=Cerrar @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Descripción tocMapLayerDownloadLabel=Descargar -incorrectLayerTypeText={0} no es un tipo de capa admitido. Utilice "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" o "wmts" en su lugar. +incorrectLayerTypeText={0} no es un tipo de capa admitido. Utilice "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" o "wmts" en su lugar. missingConfigFileText=No se pudo encontrar {0} diff --git a/locale/et_EE/ViewerStrings.properties b/locale/et_EE/ViewerStrings.properties index 7ef79a1..948e37a 100644 --- a/locale/et_EE/ViewerStrings.properties +++ b/locale/et_EE/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=ArcGIS Viewer for Flex rakendusest... -aboutText=See rakendus on loodud ArcGIS Viewer for Flex versioonil 3.2. +aboutText=See rakendus on loodud ArcGIS Viewer for Flex versioonil 3.3. aboutLearnMoreBtn=Loe lähemalt aboutCloseBtn=Sulge @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Kirjeldus tocMapLayerDownloadLabel=Lae alla -incorrectLayerTypeText={0} ei ole toetatud kihi tüüp. Palun kasutada "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" või "wmts" tüüpe. +incorrectLayerTypeText={0} ei ole toetatud kihi tüüp. Palun kasutada "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" või "wmts" tüüpe. missingConfigFileText=Ei leidnud {0} diff --git a/locale/fr_FR/ViewerStrings.properties b/locale/fr_FR/ViewerStrings.properties index 5816e1a..4d4bacb 100644 --- a/locale/fr_FR/ViewerStrings.properties +++ b/locale/fr_FR/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=A propos d’ArcGIS Viewer for Flex... -aboutText=Cette application utilise ArcGIS Viewer for Flex version 3.2. +aboutText=Cette application utilise ArcGIS Viewer for Flex 3.3. aboutLearnMoreBtn=En savoir plus aboutCloseBtn=Fermer @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Description tocMapLayerDownloadLabel=Télécharger -incorrectLayerTypeText=Le type de couche {0} n’est pas pris en charge. Utilisez plutôt les types "arcims", "bing", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" ou "wmts". +incorrectLayerTypeText=Le type de couche {0} n’est pas pris en charge. Utilisez plutôt les types "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" ou "wmts". missingConfigFileText={0} est introuvable diff --git a/locale/he_IL/ViewerStrings.properties b/locale/he_IL/ViewerStrings.properties index 7be5b8e..6de74dc 100644 --- a/locale/he_IL/ViewerStrings.properties +++ b/locale/he_IL/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=אודות ArcGIS Viewer for Flex... -aboutText=אפליקציה זו משתמשת ב - ArcGIS Viewer for Flex version 3.2. +aboutText=אפליקציה זו משתמשת ב - ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=לימוד נוסף aboutCloseBtn=סגור @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=תיאור tocMapLayerDownloadLabel=הורדה -incorrectLayerTypeText={0} אינו סוג שכבה נתמך. השתמש ב- "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" או "wmts" במקום. +incorrectLayerTypeText={0} אינו סוג שכבה נתמך. השתמש ב- "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" או "wmts" במקום. missingConfigFileText=לא יכול למצוא {0} diff --git a/locale/it_IT/ViewerStrings.properties b/locale/it_IT/ViewerStrings.properties index a0cca15..d88f0e6 100644 --- a/locale/it_IT/ViewerStrings.properties +++ b/locale/it_IT/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Informazioni su ArcGIS Viewer for Flex... -aboutText=Questa applicazione utilizza ArcGIS Viewer per Flex versione 3.1. +aboutText=Questa applicazione utilizza ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Ulteriori informazioni aboutCloseBtn=Chiudi @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Descrizione tocMapLayerDownloadLabel=Scarica -incorrectLayerTypeText={0} non è un tipo di layer supportato. Usare "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" o "wmts" . +incorrectLayerTypeText={0} non è un tipo di layer supportato. Usare "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" o "wmts" . missingConfigFileText=Impossibile trovare {0} diff --git a/locale/ja_JP/ViewerStrings.properties b/locale/ja_JP/ViewerStrings.properties index 5c0a0af..f58e4e5 100644 --- a/locale/ja_JP/ViewerStrings.properties +++ b/locale/ja_JP/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=ArcGIS Viewer for Flex について... -aboutText=このアプリケーションには ArcGIS Viewer for Flex version 3.2 が使用されています。 +aboutText=このアプリケーションには ArcGIS Viewer 3.3 for Flex が使用されています。 aboutLearnMoreBtn=詳細 aboutCloseBtn=閉じる @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=説明 tocMapLayerDownloadLabel=ダウンロード -incorrectLayerTypeText={0} はサポートされていないレイヤ タイプです。"arcims"、"bing"、"csv"、"dynamic"、"feature"、"georss"、"image"、"kml"、"osm"、"tiled"、"wms"、または "wmts" を代わりに使用してください。 +incorrectLayerTypeText={0} はサポートされていないレイヤ タイプです。"arcims"、"bing"、"csv"、"dynamic"、"feature"、"georss"、"image"、"kml"、"osm"、"tiled"、"webtiled"、"wms"、または "wmts" を代わりに使用してください。 missingConfigFileText={0} が見つかりませんでした diff --git a/locale/ko_KR/ViewerStrings.properties b/locale/ko_KR/ViewerStrings.properties index 17b806c..64194a6 100644 --- a/locale/ko_KR/ViewerStrings.properties +++ b/locale/ko_KR/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=ArcGIS Viewer for Flex 정보... -aboutText=이 응용프로그램에서는 ArcGIS Viewer for Flex 버전 3.2를 사용합니다. +aboutText=이 응용프로그램에서는 ArcGIS Viewer 3.3 for Flex를 사용 중입니다. aboutLearnMoreBtn=자세히 보기 aboutCloseBtn=닫기 @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=설명 tocMapLayerDownloadLabel=다운로드 -incorrectLayerTypeText={0}은(는) 지원되는 레이어 유형이 아닙니다. 대신 "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" 또는 "wmts"를 사용하세요. +incorrectLayerTypeText={0}은(는) 지원되는 레이어 유형이 아닙니다. 대신 "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" 또는 "wmts"를 사용하세요. missingConfigFileText={0}을(를) 찾을 수 없습니다. diff --git a/locale/lt_LT/ViewerStrings.properties b/locale/lt_LT/ViewerStrings.properties index 630bd34..7b2003b 100644 --- a/locale/lt_LT/ViewerStrings.properties +++ b/locale/lt_LT/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Apie ArcGIS Viewer for Flex... -aboutText=Aplikacija sukurta naudojant ArcGIS Viewer for Flex versiją 3.2. +aboutText=Ši aplikacija naudoja ArcGIS Viewer for Flex versiją 3.3. aboutLearnMoreBtn=Plačiau aboutCloseBtn=Uždaryti @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Aprašymas tocMapLayerDownloadLabel=Atsisiųsti -incorrectLayerTypeText={0} yra nepalaikomas sluoksnio tipas. Naudokite "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" ar "wmts". +incorrectLayerTypeText={0} yra nepalaikomas sluoksnio tipas. Naudokite "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" ar "wmts". missingConfigFileText=Nepavyko rasti: {0} diff --git a/locale/lv_LV/ViewerStrings.properties b/locale/lv_LV/ViewerStrings.properties index 16fc498..3e27281 100644 --- a/locale/lv_LV/ViewerStrings.properties +++ b/locale/lv_LV/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Par ArcGIS Viewer for Flex... -aboutText=Šī aplikācija izmanto ArcGIS Viewer for Flex versiju 3.2. +aboutText=Šī aplikācija izmanto ArcGIS Viewer for Flex 3.3. aboutLearnMoreBtn=Uzziniet vairāk aboutCloseBtn=Aizvērt @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Apraksts tocMapLayerDownloadLabel=Lejupielāde -incorrectLayerTypeText={0} nav atbalstīta slāņa tips. Lietojiet "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" or "wmts" vietā. +incorrectLayerTypeText={0} nav atbalstīta slāņa tips. Lietojiet "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" vai "wmts" vietā. missingConfigFileText=Neizdevās atrast {0} diff --git a/locale/nb_NO/ViewerStrings.properties b/locale/nb_NO/ViewerStrings.properties index 92ce772..dd7294d 100644 --- a/locale/nb_NO/ViewerStrings.properties +++ b/locale/nb_NO/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Om ArcGIS Viewer for Flex... -aboutText=Dette programmet bruker ArcGIS Viewer for Flex versjon 3.2. +aboutText=Dette programmet bruker ArcGIS Viewer for Flex versjon 3.3. aboutLearnMoreBtn=Lær mer aboutCloseBtn=Lukk @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Beskrivelse tocMapLayerDownloadLabel=Last ned -incorrectLayerTypeText={0} er ikke en støttet kartlagtype. Bruk i stedet "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" eller "wmts". +incorrectLayerTypeText={0} er ikke en støttet kartlagtype. Bruk i stedet "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" eller "wmts". missingConfigFileText=Fant ikke {0} diff --git a/locale/nl_NL/ViewerStrings.properties b/locale/nl_NL/ViewerStrings.properties index 7238c6b..050f4d4 100644 --- a/locale/nl_NL/ViewerStrings.properties +++ b/locale/nl_NL/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Informatie over ArcGIS Viewer for Flex... -aboutText=Deze applicatie maakt gebruik van ArcGIS Viewer for Flex-versie 3.2. +aboutText=Deze applicatie maakt gebruik van ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Meer informatie aboutCloseBtn=Sluiten @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Beschrijving tocMapLayerDownloadLabel=Downloaden -incorrectLayerTypeText={0} is geen ondersteund laagtype. Gebruik in plaats daarvan "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" of "wmts". +incorrectLayerTypeText={0} is geen ondersteund laagtype. Gebruik in plaats daarvan "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" of "wmts". missingConfigFileText=Kan {0} niet vinden diff --git a/locale/pl_PL/ViewerStrings.properties b/locale/pl_PL/ViewerStrings.properties index a295b82..089f0a0 100644 --- a/locale/pl_PL/ViewerStrings.properties +++ b/locale/pl_PL/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=O aplikacji ArcGIS Viewer for Flex... -aboutText=Ta aplikacja korzysta z produktu ArcGIS Viewer for Flex w wersji 3.2. +aboutText=Ta aplikacja korzysta z produktu ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Dowiedz się więcej aboutCloseBtn=Zamknij @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Opis tocMapLayerDownloadLabel=Pobierz -incorrectLayerTypeText={0} nie jest obsługiwanym typem warstwy. Zamiast tego użyj „arcims”, „bing”, „csv”, „dynamic”, „feature”, „georss”, „image”, „kml”, „osm”, „tiled”, „wms” lub „wmts”. +incorrectLayerTypeText={0} nie jest obsługiwanym typem warstwy. Zamiast tego użyj „arcims”, „bing”, „csv”, „dynamic”, „feature”, „georss”, „image”, „kml”, „osm”, „tiled”, „webtiled”, „wms” lub „wmts”. missingConfigFileText=Nie można było odnaleźć {0} diff --git a/locale/pt_BR/ViewerStrings.properties b/locale/pt_BR/ViewerStrings.properties index 7e7ac09..22b46e2 100644 --- a/locale/pt_BR/ViewerStrings.properties +++ b/locale/pt_BR/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Sobre o ArcGIS Viewer for Flex... -aboutText=Este aplicativo utiliza o ArcGIS Viewer for Flex version 3.2. +aboutText=Este aplicativo utiliza o ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Obter mais informações aboutCloseBtn=Fechar @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Descrição tocMapLayerDownloadLabel=Download -incorrectLayerTypeText={0} não é um tipo de camada suportado. Use "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" ou "wmts" +incorrectLayerTypeText={0} não é um tipo de camada suportado. Use "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" ou "wmts" missingConfigFileText=Não foi possível encontrar {0} diff --git a/locale/pt_PT/ViewerStrings.properties b/locale/pt_PT/ViewerStrings.properties index f96793b..aff0d3b 100644 --- a/locale/pt_PT/ViewerStrings.properties +++ b/locale/pt_PT/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Sobre o ArcGIS Viewer for Flex... -aboutText=Esta aplicação utiliza o ArcGIS Viewer for Flex versão 3.2. +aboutText=Esta aplicação utiliza o ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Obter mais informações aboutCloseBtn=Fechar @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Descrição tocMapLayerDownloadLabel=Descarregar -incorrectLayerTypeText={0} não é um tipo de camada suportado. Utilize "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" ou "wmts" +incorrectLayerTypeText={0} não é um tipo de camada suportado. Utilize "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" ou "wmts". missingConfigFileText=Não foi possível encontrar {0} diff --git a/locale/ro_RO/ViewerStrings.properties b/locale/ro_RO/ViewerStrings.properties index 92bf477..8f961e9 100644 --- a/locale/ro_RO/ViewerStrings.properties +++ b/locale/ro_RO/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Despre ArcGIS Viewer for Flex... -aboutText=Această aplicaţie utilizează ArcGIS Viewer for Flex versiunea 3.2. +aboutText=Această aplicaţie utilizează ArcGIS Viewer 3.3 for Flex. aboutLearnMoreBtn=Aflaţi mai multe aboutCloseBtn=Închidere @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Descriere tocMapLayerDownloadLabel=Descărcare -incorrectLayerTypeText={0} nu este un tip de strat tematic acceptat. În loc, utilizaţi "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" sau "wmts". +incorrectLayerTypeText={0} nu este un tip de strat tematic acceptat. În loc, utilizaţi"arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" sau "wmts". missingConfigFileText={0} nu a putut fi găsit diff --git a/locale/ru_RU/ViewerStrings.properties b/locale/ru_RU/ViewerStrings.properties index 1134346..1ccaa26 100644 --- a/locale/ru_RU/ViewerStrings.properties +++ b/locale/ru_RU/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=О программе ArcGIS Viewer for Flex... -aboutText=Это приложение использует ArcGIS Viewer for Flex версии 3.2. +aboutText=Это приложение использует ArcGIS Viewer for Flex версии 3.3. aboutLearnMoreBtn=См. Справку aboutCloseBtn=Закрыть @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Описание tocMapLayerDownloadLabel=Скачать -incorrectLayerTypeText={0} не является поддерживаемым типом слоя. Используйте значение "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled" или "wms". +incorrectLayerTypeText={0} не является поддерживаемым типом слоя. Используйте значение "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" или "wmts". missingConfigFileText=Не удалось найти {0} diff --git a/locale/sv_SE/ViewerStrings.properties b/locale/sv_SE/ViewerStrings.properties index d6d5804..2760f43 100644 --- a/locale/sv_SE/ViewerStrings.properties +++ b/locale/sv_SE/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=Om ArcGIS Viewer for Flex... -aboutText=Det här programmet använder ArcGIS Viewer for Flex version 3.2. +aboutText=Det här programmet använder ArcGIS Viewer for Flex version 3.3. aboutLearnMoreBtn=Läs mer aboutCloseBtn=Stäng @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=Beskrivning tocMapLayerDownloadLabel=Hämta -incorrectLayerTypeText={0} är inte en lagertyp som stöds. Använd "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "wms" eller "wms" i stället. +incorrectLayerTypeText={0} är inte en lagertyp som stöds. Använd "arcims", "bing", "csv", "dynamic", "feature", "georss", "image", "kml", "osm", "tiled", "webtiled", "wms" eller "wmts" i stället. missingConfigFileText=Det gick inte att hitta {0} diff --git a/locale/zh_CN/ViewerStrings.properties b/locale/zh_CN/ViewerStrings.properties index df19d13..8c2720b 100644 --- a/locale/zh_CN/ViewerStrings.properties +++ b/locale/zh_CN/ViewerStrings.properties @@ -1,7 +1,7 @@ contextMenuText=关于 ArcGIS Viewer for Flex... -aboutText=此应用程序是使用 ArcGIS Viewer for Flex 版本 3.2 构建而成的。 +aboutText=此应用程序是使用 ArcGIS Viewer 3.3 for Flex 构建而成的。 aboutLearnMoreBtn=了解更多信息 aboutCloseBtn=关闭 @@ -69,7 +69,7 @@ tocMapLayerDescriptionLabel=描述 tocMapLayerDownloadLabel=下载 -incorrectLayerTypeText={0} 不是受支持的图层类型。请改用“arcims”、“bing”、“csv”“dynamic”、“feature”、“georss”、“image”、“kml”、“osm”、“tiled”、“wms”或“wmts”。 +incorrectLayerTypeText={0} 不是受支持的图层类型。请改用“arcims”、“bing”、“csv”“dynamic”、“feature”、“georss”、“image”、“kml”、“osm”、“tiled”、“webtiled”、“wms”或“wmts”。 missingConfigFileText=无法找到 {0} From bb082f6e0b9758d4fc67a9e2e6c00dbae77cf917 Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Thu, 11 Apr 2013 15:56:22 -0700 Subject: [PATCH 25/54] remove default url as the Directions component has a default --- src/widgets/Directions/DirectionsWidget.mxml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/widgets/Directions/DirectionsWidget.mxml b/src/widgets/Directions/DirectionsWidget.mxml index b5c5b43..1e86396 100644 --- a/src/widgets/Directions/DirectionsWidget.mxml +++ b/src/widgets/Directions/DirectionsWidget.mxml @@ -35,9 +35,6 @@ import mx.collections.*; import mx.events.FlexEvent; - [Bindable] - private var directionsURL:String = "http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World"; // default url - protected function basewidget_initializeHandler(event:FlexEvent):void { if (isPartOfPanel) // if widget is part of "left", "right" or "bottom" panel @@ -62,7 +59,7 @@ var url:String = configXML.url[0]; if (url) { - directionsURL = url; + directions.url = url; } var useProxyForDirections:Boolean = configXML.useproxy[0] && configXML.useproxy == "true"; if (useProxyForDirections && configData.proxyUrl) @@ -278,7 +275,6 @@ + map="{map}"/> From 77076cb8ce4d4a2c72cb9ea00a83de2e8e607295 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Thu, 11 Apr 2013 19:01:51 -0700 Subject: [PATCH 26/54] Dutch and Arabic update --- locale/ar/ViewerStrings.properties | 2 +- locale/nl_NL/ViewerStrings.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/ar/ViewerStrings.properties b/locale/ar/ViewerStrings.properties index 5fc45ce..eda80f7 100644 --- a/locale/ar/ViewerStrings.properties +++ b/locale/ar/ViewerStrings.properties @@ -107,7 +107,7 @@ cannotRunTaskExecutionTypeUnknownError=يتعذر تشغيل المهمة: نو layerDataRetrievalError=تعذر إرجاع بيانات الطبقة. couldNotDeleteFeature=تعذر حذف المعلم couldNotUpdateFeatureError=تعذر تحديث المعلم، استعادة القيمة القديمة -cannotDisplayResult=لا يمكن عرض النتيجة على الخريطة. +cannotDisplayResult=يتعذر عرض النتيجة على الخريطة. uploadSecurityError=تمت مواجهة خطأ أمان أثناء تحميل الملف: {0} uploadIOError=تمت مواجهة خطأ IO أثناء تحميل الملف: {0} uploadUnknownError=حدث خطأ غير معروف أثناء تحميل الملف. diff --git a/locale/nl_NL/ViewerStrings.properties b/locale/nl_NL/ViewerStrings.properties index 050f4d4..3158e22 100644 --- a/locale/nl_NL/ViewerStrings.properties +++ b/locale/nl_NL/ViewerStrings.properties @@ -251,10 +251,10 @@ saveDataFileLabel=Het gegevensbestand is gemaakt. Wilt u het opslaan? attributesLabel=Attributen attachmentsLabel=Bijlagen -relatedRecordsLabel=Verwante records +relatedRecordsLabel=Gerelateerde records featureLayerOutOfScaleText=Deze objectlaag valt buiten het schaalbereik showAttachmentsText=Bijlagen -showRelatedRecordsText=Verwante records +showRelatedRecordsText=Gerelateerde records showAttributesText=Terug selectTemplateText=Sjabloon voor het maken van een object selecteren noEditableLayersText=Geen bewerkbare lagen. From f61a0e78c50d384e1d4d5afa2abe4605c4e9709e Mon Sep 17 00:00:00 2001 From: jcfranco Date: Fri, 12 Apr 2013 10:25:36 -0700 Subject: [PATCH 27/54] Fix RTE when trying to zoom to a layer when neither layer nor map have a spatial reference defined. --- .../esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml b/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml index eae56d9..e1ef54c 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml +++ b/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml @@ -144,7 +144,8 @@ } var layerExtent:Extent = _layer.initialExtent; - if (!_map.extent.spatialReference.equals(layerExtent.spatialReference)) + if (layerExtent && _map.extent + && !_map.extent.spatialReference.equals(layerExtent.spatialReference)) { // convert client side. if (_map.extent.spatialReference.isWebMercator() && layerExtent.spatialReference.wkid == 4326) From 293e58e6d1029a8532d39d869b4143f8dea92e36 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Fri, 12 Apr 2013 10:29:23 -0700 Subject: [PATCH 28/54] Clean up. --- .../components/toc/tocClasses/TocLayerMenu.mxml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml b/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml index e1ef54c..930af0d 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml +++ b/src/com/esri/viewer/components/toc/tocClasses/TocLayerMenu.mxml @@ -144,11 +144,12 @@ } var layerExtent:Extent = _layer.initialExtent; - if (layerExtent && _map.extent - && !_map.extent.spatialReference.equals(layerExtent.spatialReference)) + var mapExtent:Extent = _map.extent; + if (layerExtent && mapExtent + && !mapExtent.spatialReference.equals(layerExtent.spatialReference)) { // convert client side. - if (_map.extent.spatialReference.isWebMercator() && layerExtent.spatialReference.wkid == 4326) + if (mapExtent.spatialReference.isWebMercator() && layerExtent.spatialReference.wkid == 4326) { // clip the layer extent, so it's not going to Infinity; otherwise gives an error layerExtent.xmin = Math.max(layerExtent.xmin, -180); @@ -158,7 +159,7 @@ layerExtent = WebMercatorUtil.geographicToWebMercator(layerExtent) as Extent; updateMapExtent(layerExtent); } - else if (layerExtent.spatialReference.isWebMercator() && _map.extent.spatialReference.wkid == 4326) + else if (layerExtent.spatialReference.isWebMercator() && mapExtent.spatialReference.wkid == 4326) { layerExtent = WebMercatorUtil.webMercatorToGeographic(layerExtent) as Extent; updateMapExtent(layerExtent); @@ -167,7 +168,7 @@ { const projectParameters:ProjectParameters = new ProjectParameters; projectParameters.geometries = [ layerExtent ]; - projectParameters.outSpatialReference = _map.extent.spatialReference + projectParameters.outSpatialReference = mapExtent.spatialReference geometryService.project(projectParameters); } } From 03b78467cb8eb0f8e915fe063f4226cc0495e635 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Fri, 12 Apr 2013 13:24:54 -0700 Subject: [PATCH 29/54] Support RasterDataLayerParam parsing & validating its default value. --- .../parameters/RasterDataLayerParam.as | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/src/widgets/Geoprocessing/parameters/RasterDataLayerParam.as b/src/widgets/Geoprocessing/parameters/RasterDataLayerParam.as index 1c6e590..8e576ed 100644 --- a/src/widgets/Geoprocessing/parameters/RasterDataLayerParam.as +++ b/src/widgets/Geoprocessing/parameters/RasterDataLayerParam.as @@ -20,6 +20,18 @@ import com.esri.ags.tasks.supportClasses.RasterData; public class RasterDataLayerParam extends BaseParameter { + //-------------------------------------------------------------------------- + // + // Constants + // + //-------------------------------------------------------------------------- + + private static const URL_DELIMITER:String = "url:"; + private static const FORMAT_DELIMITER:String = "format:"; + private static const ITEM_ID_DELIMITER:String = "itemID:"; + + private static const VALID_URL_REGEX:RegExp = /^(ht|f)tps?:\/\/[^\s\.]+(\.[^\s\.]+)*((\/|\.)[^\s\.]+)+\/?$/; + //-------------------------------------------------------------------------- // // Overridden properties @@ -57,9 +69,48 @@ public class RasterDataLayerParam extends BaseParameter // //-------------------------------------------------------------------------- - public override function defaultValueFromString(text:String):void + public override function defaultValueFromString(description:String):void + { + var dataFile:RasterData = new RasterData(); + + if (description.indexOf(URL_DELIMITER) == 0 + || description.indexOf(FORMAT_DELIMITER) == 0) + { + var tokens:Array = description.split(","); + for each (var token:String in tokens) + { + if (token.indexOf(URL_DELIMITER) == 0) + { + dataFile.url = token.substr(URL_DELIMITER.length); + } + else if (token.indexOf(FORMAT_DELIMITER) == 0) + { + dataFile.format = token.substr(FORMAT_DELIMITER.length); + } + } + } + else if (description.indexOf(ITEM_ID_DELIMITER) == 0) + { + dataFile.itemID = description.substr(ITEM_ID_DELIMITER.length); + } + + _defaultValue = dataFile; + } + + override public function hasValidValue():Boolean { - //NOT SUPPORTED - OUTPUT PARAM ONLY + if (_defaultValue.itemID) + { + return true; + } + else if (_defaultValue.url) + { + return VALID_URL_REGEX.test(_defaultValue.url); + } + else + { + return false; + } } } From cd240ed8339c303af26bad5837cbe7df7a80df9d Mon Sep 17 00:00:00 2001 From: jcfranco Date: Fri, 12 Apr 2013 13:29:04 -0700 Subject: [PATCH 30/54] Add support for GP input raster layer parameters. --- locale/en_US/ViewerStrings.properties | 1 + ...InputRasterDataLayerParamItemRenderer.mxml | 280 +++++++++++++++++- .../supportClasses/GPParamHandler.as | 3 +- 3 files changed, 282 insertions(+), 2 deletions(-) diff --git a/locale/en_US/ViewerStrings.properties b/locale/en_US/ViewerStrings.properties index 81abb71..0301fcc 100644 --- a/locale/en_US/ViewerStrings.properties +++ b/locale/en_US/ViewerStrings.properties @@ -345,6 +345,7 @@ byURL=By URL fileURL=File URL uploadFile=Upload file or=or +format=Format ########## Popups zoomLabel=Zoom to diff --git a/src/widgets/Geoprocessing/renderers/input/GPInputRasterDataLayerParamItemRenderer.mxml b/src/widgets/Geoprocessing/renderers/input/GPInputRasterDataLayerParamItemRenderer.mxml index 35ca385..1a91171 100644 --- a/src/widgets/Geoprocessing/renderers/input/GPInputRasterDataLayerParamItemRenderer.mxml +++ b/src/widgets/Geoprocessing/renderers/input/GPInputRasterDataLayerParamItemRenderer.mxml @@ -19,15 +19,293 @@ + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + diff --git a/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as b/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as index 26dd1e1..91cf9e3 100644 --- a/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as +++ b/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as @@ -432,7 +432,8 @@ public class GPParamHandler for each (var param:IGPParameter in inputParams) { - if (param.type == GPParameterTypes.DATA_FILE) + if (param.type == GPParameterTypes.DATA_FILE + || param.type == GPParameterTypes.RASTER_DATA_LAYER) { hasUploadCompatibleInputParam = true; break; From 3fe31ee6b14c8418560060691c63524b21ec279a Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 15 Apr 2013 15:03:36 -0700 Subject: [PATCH 31/54] Add workaround for named Portal instance scenario. --- src/com/esri/viewer/managers/ConfigManager.as | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/com/esri/viewer/managers/ConfigManager.as b/src/com/esri/viewer/managers/ConfigManager.as index abd1d36..40ad089 100644 --- a/src/com/esri/viewer/managers/ConfigManager.as +++ b/src/com/esri/viewer/managers/ConfigManager.as @@ -16,6 +16,8 @@ package com.esri.viewer.managers { +import com.esri.ags.components.IdentityManager; +import com.esri.ags.components.supportClasses.ServerInfo; import com.esri.ags.events.WebMapEvent; import com.esri.ags.geometry.Extent; import com.esri.ags.layers.ArcGISDynamicMapServiceLayer; @@ -53,6 +55,7 @@ import mx.rpc.Responder; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.http.HTTPService; +import mx.utils.URLUtil; [Event(name="configLoaded", type="com.esri.viewer.AppEvent")] @@ -598,6 +601,20 @@ public class ConfigManager extends EventDispatcher var portalURL:String = configXML.map.@portalurl[0] || configXML.map.@arcgissharingurl[0]; var addArcGISBasemaps:Boolean = configXML.map.@addarcgisbasemaps[0] == "true"; + if (portalURL) + { + //workaround for named Portal instance scenario. + var serverURL:String = URLUtil.getProtocol(portalURL) + "://" + URLUtil.getServerName(portalURL); + var tokenServiceURL:String = portalURL.replace(/\/sharing.+/, "") + "/sharing/generateToken"; + tokenServiceURL = URLUtil.replaceProtocol(tokenServiceURL, "https"); + + var serverInfo:ServerInfo = new ServerInfo(); + serverInfo.server = serverURL; + serverInfo.tokenServiceURL = tokenServiceURL; + + IdentityManager.instance.registerServers([ serverInfo ]); + } + if (webMapItemID) { var webMapUtil:WebMapUtil = new WebMapUtil(); From ef1d0b53e3cd318bab56fdd1a92692b0b6cd74e8 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 16 Apr 2013 15:04:50 -0700 Subject: [PATCH 32/54] Fix potential race condition when processing Portal basemaps. --- src/com/esri/viewer/utils/PortalBasemapAppender.as | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/com/esri/viewer/utils/PortalBasemapAppender.as b/src/com/esri/viewer/utils/PortalBasemapAppender.as index 8e0ffee..309ec9e 100644 --- a/src/com/esri/viewer/utils/PortalBasemapAppender.as +++ b/src/com/esri/viewer/utils/PortalBasemapAppender.as @@ -107,10 +107,8 @@ public class PortalBasemapAppender extends EventDispatcher portalItemToLabel = new Dictionary(true); processedArcGISBasemaps = []; totalBasemaps = configData.basemaps.length; - var portalItem:PortalItem; - for (var i:uint = 0; i < totalPossibleArcGISBasemaps; i++) + for each (var portalItem:PortalItem in resultItems) { - portalItem = resultItems[i]; portalItemOrder.push(portalItem); portalItem.getJSONData(new AsyncResponder(portalItem_getJSONDataResultHandler, portalItem_getJSONDataFaultHandler, From e4548eddfc0afe78be2256d6bf49f29e79ab1ecc Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 16 Apr 2013 15:09:05 -0700 Subject: [PATCH 33/54] Clean up. --- src/com/esri/viewer/utils/PortalBasemapAppender.as | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/esri/viewer/utils/PortalBasemapAppender.as b/src/com/esri/viewer/utils/PortalBasemapAppender.as index 309ec9e..c82655a 100644 --- a/src/com/esri/viewer/utils/PortalBasemapAppender.as +++ b/src/com/esri/viewer/utils/PortalBasemapAppender.as @@ -118,7 +118,7 @@ public class PortalBasemapAppender extends EventDispatcher private function portalItem_getJSONDataResultHandler(itemData:Object, item:PortalItem):void { - createBasemapLayerObject(itemData, item); + createBasemapLayerObjectFromWebMapItemAndData(item, itemData); if (isDefaultBasemap(itemData.baseMap)) { defaultBasemapTitle = itemData.baseMap.title; @@ -126,7 +126,7 @@ public class PortalBasemapAppender extends EventDispatcher updateTotalArcGISBasemaps(); } - private function createBasemapLayerObject(itemData:Object, item:PortalItem):void + private function createBasemapLayerObjectFromWebMapItemAndData(item:PortalItem, itemData:Object):void { if (!itemData) { @@ -311,7 +311,7 @@ public class PortalBasemapAppender extends EventDispatcher { layerXML = createTiledLayerXML(title, iconURL, url, basemapLayerObject, false); } - else if (isAllowedType(type)) + else if (isNonEsriType(type)) { layerXML = createNonEsriLayerXML(title, iconURL, basemapLayerObject, false, type); } @@ -331,7 +331,7 @@ public class PortalBasemapAppender extends EventDispatcher return layerXML; } - private function isAllowedType(type:String):Boolean + private function isNonEsriType(type:String):Boolean { return type == "OpenStreetMap" || (isBingBasemap(type) && hasBingKey()); From 033b151213126944facb67a2fa9d6acc20316787 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 16 Apr 2013 15:14:13 -0700 Subject: [PATCH 34/54] Generalize logic for creating layer XML. --- src/com/esri/viewer/utils/PortalBasemapAppender.as | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/com/esri/viewer/utils/PortalBasemapAppender.as b/src/com/esri/viewer/utils/PortalBasemapAppender.as index c82655a..f44d48e 100644 --- a/src/com/esri/viewer/utils/PortalBasemapAppender.as +++ b/src/com/esri/viewer/utils/PortalBasemapAppender.as @@ -309,7 +309,7 @@ public class PortalBasemapAppender extends EventDispatcher if (url) { - layerXML = createTiledLayerXML(title, iconURL, url, basemapLayerObject, false); + layerXML = createLayerXML(title, "tiled", iconURL, url, basemapLayerObject.opacity, false); } else if (isNonEsriType(type)) { @@ -319,16 +319,14 @@ public class PortalBasemapAppender extends EventDispatcher return layerXML; } - private function createTiledLayerXML(title:String, iconURL:String, url:String, basemapLayerObject:Object, visible:Boolean):XML + private function createLayerXML(title:String, type:String, iconURL:String, url:String, alpha:Number, visible:Boolean):XML { - var layerXML:XML = ; - - return layerXML; } private function isNonEsriType(type:String):Boolean From 092eaa653abd275293d6afb49528ba4d33913f1a Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 16 Apr 2013 11:55:48 -0700 Subject: [PATCH 35/54] Support appending basemaps from Portal map-service items. --- .../viewer/utils/PortalBasemapAppender.as | 125 +++++++++++++++++- 1 file changed, 118 insertions(+), 7 deletions(-) diff --git a/src/com/esri/viewer/utils/PortalBasemapAppender.as b/src/com/esri/viewer/utils/PortalBasemapAppender.as index f44d48e..faf2382 100644 --- a/src/com/esri/viewer/utils/PortalBasemapAppender.as +++ b/src/com/esri/viewer/utils/PortalBasemapAppender.as @@ -23,11 +23,13 @@ import com.esri.ags.portal.supportClasses.PortalGroup; import com.esri.ags.portal.supportClasses.PortalItem; import com.esri.ags.portal.supportClasses.PortalQueryParameters; import com.esri.ags.portal.supportClasses.PortalQueryResult; +import com.esri.ags.tasks.JSONTask; import com.esri.viewer.AppEvent; import com.esri.viewer.ConfigData; import flash.events.Event; import flash.events.EventDispatcher; +import flash.net.URLVariables; import flash.utils.Dictionary; import mx.resources.ResourceManager; @@ -107,16 +109,38 @@ public class PortalBasemapAppender extends EventDispatcher portalItemToLabel = new Dictionary(true); processedArcGISBasemaps = []; totalBasemaps = configData.basemaps.length; - for each (var portalItem:PortalItem in resultItems) + for each (var item:PortalItem in resultItems) { - portalItemOrder.push(portalItem); - portalItem.getJSONData(new AsyncResponder(portalItem_getJSONDataResultHandler, - portalItem_getJSONDataFaultHandler, - portalItem)); + processPortalItem(item); } } - private function portalItem_getJSONDataResultHandler(itemData:Object, item:PortalItem):void + private function processPortalItem(item:PortalItem):void + { + if (item.type == PortalItem.TYPE_WEB_MAP) + { + portalItemOrder.push(item); + processWebMapPortalItem(item); + } + else if (item.type == PortalItem.TYPE_MAP_SERVICE) + { + portalItemOrder.push(item); + processMapServicePortalItem(item); + } + else + { + updateTotalArcGISBasemaps(); + } + } + + private function processWebMapPortalItem(item:PortalItem):void + { + item.getJSONData(new AsyncResponder(item_getJSONDataResultHandler, + item_getJSONDataFaultHandler, + item)); + } + + private function item_getJSONDataResultHandler(itemData:Object, item:PortalItem):void { createBasemapLayerObjectFromWebMapItemAndData(item, itemData); if (isDefaultBasemap(itemData.baseMap)) @@ -395,7 +419,7 @@ public class PortalBasemapAppender extends EventDispatcher } } - private function portalItem_getJSONDataFaultHandler(fault:Fault, token:Object = null):void + private function item_getJSONDataFaultHandler(fault:Fault, token:Object = null):void { AppEvent.dispatch(AppEvent.APP_ERROR, LocalizationUtil.getDefaultString("couldNotFetchBasemapData", @@ -403,6 +427,93 @@ public class PortalBasemapAppender extends EventDispatcher updateTotalArcGISBasemaps(); } + private function processMapServicePortalItem(item:PortalItem):void + { + const urlVars:URLVariables = new URLVariables(); + urlVars.f = "json"; + var mapServiceMetadataRequest:JSONTask = new JSONTask(item.url); + mapServiceMetadataRequest.execute( + urlVars, new AsyncResponder(mapServiceRequest_resultHandler, + mapServiceRequest_faultHandler, + item)); + } + + private function mapServiceRequest_resultHandler(serviceMetadata:Object, item:PortalItem):void + { + createBasemapLayerObjectFromMapServiceItemAndData(item, serviceMetadata); + updateTotalArcGISBasemaps(); + } + + private function createBasemapLayerObjectFromMapServiceItemAndData(item:PortalItem, serviceMetadata:Object):void + { + if (!serviceMetadata) + { + return; + } + + var layerType:String = getLayerType(serviceMetadata, item); + if (!layerType) + { + return; + } + + var title:String = item.title; + var iconURL:String = item.thumbnailURL; + var existingBasemapLayerObject:Object = findBasemapLayerObjectById(title); + if (existingBasemapLayerObject) + { + existingBasemapLayerObject.icon = iconURL; + return; + } + + portalItemToLabel[item] = title; + addBasemapLayerObject(mapServicePortalItemToLayerXML(item, layerType)); + } + + private function getLayerType(serviceMetadata:Object, item:PortalItem):String + { + var layerType:String; + + if (serviceMetadata.singleFusedMapCache) + { + layerType = "tiled"; + } + else if (serviceMetadata.bandCount) + { + layerType = "image"; + } + else if (isNaN(Number(item.url.charAt(item.url.length - 1)))) + { + layerType = "dynamic"; + } + else + { + layerType = "feature"; + } + + return layerType; + } + + private function mapServicePortalItemToLayerXML(item:PortalItem, type:String):XML + { + const title:String = item.title; + const iconURL:String = item.thumbnailURL; + const url:String = item.url; + return createLayerXML(title, type, iconURL, url, 1, false); + } + + private function mapServiceRequest_faultHandler(fault:Fault, token:Object = null):void + { + if (fault.faultString != "Sign in aborted") + { + AppEvent.dispatch(AppEvent.APP_ERROR, + LocalizationUtil.getDefaultString("couldNotFetchBasemapData", + fault.faultString)); + } + + updateTotalArcGISBasemaps(); + } + private function portal_queryGroupsFaultHandler(fault:Fault, token:Object = null):void { AppEvent.showError(LocalizationUtil.getDefaultString("couldNotQueryPortal"), PORTAL_BASEMAP_APPENDER); From 82afa992b3107a1c0a6703ce1d924717cebca67c Mon Sep 17 00:00:00 2001 From: jcfranco Date: Wed, 17 Apr 2013 12:20:42 -0700 Subject: [PATCH 36/54] Override default Alert labels with localized ones. --- locale/en_US/ViewerStrings.properties | 3 +++ src/com/esri/viewer/ViewerContainer.mxml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/locale/en_US/ViewerStrings.properties b/locale/en_US/ViewerStrings.properties index 0301fcc..137429d 100644 --- a/locale/en_US/ViewerStrings.properties +++ b/locale/en_US/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=-77.03655 locateExampleValueY=38.89767 # -- Generic strings -- +yesLabel=Yes +noLabel=No clearLabel=Clear deleteLabel=Delete loadingLabel=Loading... okLabel=OK +cancelLabel=Cancel errorLabel=Error problemLabel=Problem noFeatures=No features found. diff --git a/src/com/esri/viewer/ViewerContainer.mxml b/src/com/esri/viewer/ViewerContainer.mxml index 4ebf831..b2ac259 100644 --- a/src/com/esri/viewer/ViewerContainer.mxml +++ b/src/com/esri/viewer/ViewerContainer.mxml @@ -38,6 +38,7 @@ import com.esri.viewer.managers.WidgetManager; import com.esri.viewer.utils.LocalizationUtil; + import mx.controls.Alert; import mx.core.FlexGlobals; import mx.core.IVisualElement; import mx.events.FlexEvent; @@ -107,6 +108,11 @@ private function initializeHandler(event:FlexEvent):void { IdentityManager.instance.enabled = true; + + Alert.yesLabel = LocalizationUtil.getDefaultString('yesLabel'); + Alert.noLabel = LocalizationUtil.getDefaultString('noLabel'); + Alert.okLabel = LocalizationUtil.getDefaultString('okLabel'); + Alert.cancelLabel = LocalizationUtil.getDefaultString('cancelLabel'); } private function creationCompleteHandler(event:FlexEvent):void From 472b27bee89f14ba248cae69cbfa4c65a5282676 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Wed, 17 Apr 2013 11:18:38 -0700 Subject: [PATCH 37/54] Disable navigation if map not loaded. --- src/widgets/Navigation/Navigation.mxml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/widgets/Navigation/Navigation.mxml b/src/widgets/Navigation/Navigation.mxml index 55384a2..360a350 100644 --- a/src/widgets/Navigation/Navigation.mxml +++ b/src/widgets/Navigation/Navigation.mxml @@ -128,7 +128,8 @@ blurX="10" blurY="10"/> - - + - + Date: Wed, 17 Apr 2013 15:03:48 -0700 Subject: [PATCH 38/54] Add yes/no/cancel labels --- locale/ar/ViewerStrings.properties | 4 ++++ locale/da_DK/ViewerStrings.properties | 4 ++++ locale/de_DE/ViewerStrings.properties | 4 ++++ locale/es_ES/ViewerStrings.properties | 4 ++++ locale/et_EE/ViewerStrings.properties | 4 ++++ locale/fr_FR/ViewerStrings.properties | 4 ++++ locale/he_IL/ViewerStrings.properties | 4 ++++ locale/it_IT/ViewerStrings.properties | 4 ++++ locale/ja_JP/ViewerStrings.properties | 4 ++++ locale/ko_KR/ViewerStrings.properties | 4 ++++ locale/lt_LT/ViewerStrings.properties | 4 ++++ locale/lv_LV/ViewerStrings.properties | 4 ++++ locale/nb_NO/ViewerStrings.properties | 4 ++++ locale/nl_NL/ViewerStrings.properties | 4 ++++ locale/pl_PL/ViewerStrings.properties | 4 ++++ locale/pt_BR/ViewerStrings.properties | 4 ++++ locale/pt_PT/ViewerStrings.properties | 4 ++++ locale/ro_RO/ViewerStrings.properties | 4 ++++ locale/ru_RU/ViewerStrings.properties | 4 ++++ locale/sv_SE/ViewerStrings.properties | 4 ++++ locale/zh_CN/ViewerStrings.properties | 4 ++++ 21 files changed, 84 insertions(+) diff --git a/locale/ar/ViewerStrings.properties b/locale/ar/ViewerStrings.properties index eda80f7..74bdca1 100644 --- a/locale/ar/ViewerStrings.properties +++ b/locale/ar/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=31.1311 locateExampleValueY=29.9761 +yesLabel=نعم +noLabel=لا clearLabel=مسح deleteLabel=حذف loadingLabel=جاري التحميل... okLabel=موافق +cancelLabel=Cancel errorLabel=خطأ problemLabel=مشكلة noFeatures=لم يتم العثور على معالم. @@ -345,6 +348,7 @@ byURL=تبعًا لعنوان URL fileURL=عنوان URL للملف uploadFile=تحميل الملف or=أو +format=تنسيق zoomLabel=تقريب إلى diff --git a/locale/da_DK/ViewerStrings.properties b/locale/da_DK/ViewerStrings.properties index fce072e..a98d75c 100644 --- a/locale/da_DK/ViewerStrings.properties +++ b/locale/da_DK/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=12.5683 locateExampleValueY=55.6761 +yesLabel=Ja +noLabel=Nej clearLabel=Ryd deleteLabel=Slet loadingLabel=Indlæser... okLabel=OK +cancelLabel=Annullér errorLabel=Fejl problemLabel=Problem noFeatures=Ingen objekte fundet. @@ -345,6 +348,7 @@ byURL=Vha. URL fileURL=Fil-URL uploadFile=Overfør fil or=eller +format=Formatér zoomLabel=Zoom til diff --git a/locale/de_DE/ViewerStrings.properties b/locale/de_DE/ViewerStrings.properties index f9c0708..16e571e 100644 --- a/locale/de_DE/ViewerStrings.properties +++ b/locale/de_DE/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=13.376 locateExampleValueY=52.519 +yesLabel=Ja +noLabel=Nein clearLabel=Inhalt löschen deleteLabel=Löschen loadingLabel=Wird geladen… okLabel=OK +cancelLabel=Abbrechen errorLabel=Fehler problemLabel=Problem noFeatures=Keine Features gefunden. @@ -345,6 +348,7 @@ byURL=Über die URL fileURL=Datei-URL uploadFile=Datei hochladen or=oder +format=Format zoomLabel=Zoomen auf diff --git a/locale/es_ES/ViewerStrings.properties b/locale/es_ES/ViewerStrings.properties index 77c8cd5..f9c41df 100644 --- a/locale/es_ES/ViewerStrings.properties +++ b/locale/es_ES/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=-3.7139 locateExampleValueY=40.4181 +yesLabel=Sí +noLabel=No clearLabel=Borrar deleteLabel=Eliminar loadingLabel=Cargando... okLabel=Aceptar +cancelLabel=Cancelar errorLabel=Error problemLabel=Problema noFeatures=No se encontraron entidades. @@ -345,6 +348,7 @@ byURL=Por dirección URL fileURL=Dirección URL de archivo uploadFile=Cargar archivo or=o +format=Formato zoomLabel=Acercar a diff --git a/locale/et_EE/ViewerStrings.properties b/locale/et_EE/ViewerStrings.properties index 948e37a..0e48f28 100644 --- a/locale/et_EE/ViewerStrings.properties +++ b/locale/et_EE/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=24.7453 locateExampleValueY=59.4372 +yesLabel=Jah +noLabel=Ei clearLabel=Tühjenda deleteLabel=Kustuta loadingLabel=Laen... okLabel=OK +cancelLabel=Tühista errorLabel=Viga problemLabel=Probleem noFeatures=Objekte ei leitud. @@ -345,6 +348,7 @@ byURL=URL-i abil fileURL=Faili URL uploadFile=Lae fail üles or=või +format=Formaat zoomLabel=Suumi juurde diff --git a/locale/fr_FR/ViewerStrings.properties b/locale/fr_FR/ViewerStrings.properties index 4d4bacb..361a6e5 100644 --- a/locale/fr_FR/ViewerStrings.properties +++ b/locale/fr_FR/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=2.2945 locateExampleValueY=48.8583 +yesLabel=Oui +noLabel=Non clearLabel=Effacer deleteLabel=Supprimer loadingLabel=Chargement… okLabel=OK +cancelLabel=Annuler errorLabel=Erreur problemLabel=Problème noFeatures=Aucune entité n’a été trouvée. @@ -345,6 +348,7 @@ byURL=Par URL fileURL=URL du fichier uploadFile=Télécharger le fichier or=ou +format=Format zoomLabel=Zoom sur diff --git a/locale/he_IL/ViewerStrings.properties b/locale/he_IL/ViewerStrings.properties index 6de74dc..f7e7973 100644 --- a/locale/he_IL/ViewerStrings.properties +++ b/locale/he_IL/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=34.7932 locateExampleValueY=32.0735 +yesLabel=כן +noLabel=לא clearLabel=נקה deleteLabel=מחק loadingLabel=טוען... okLabel=אישור +cancelLabel=ביטול errorLabel=שגיאה problemLabel=בעיה noFeatures=לא נמצאו ישויות @@ -345,6 +348,7 @@ byURL=לפי URL fileURL=URL לקובץ uploadFile=טעינת קובץ or=או +format=פורמט zoomLabel=התמקדות diff --git a/locale/it_IT/ViewerStrings.properties b/locale/it_IT/ViewerStrings.properties index d88f0e6..1237851 100644 --- a/locale/it_IT/ViewerStrings.properties +++ b/locale/it_IT/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=12.4832 locateExampleValueY=41.9060 +yesLabel=Sì +noLabel=No clearLabel=Cancella deleteLabel=Elimina loadingLabel=Caricamento in corso... okLabel=OK +cancelLabel=Annulla errorLabel=Errore problemLabel=Problema noFeatures=Nessuna feature trovata. @@ -345,6 +348,7 @@ byURL=Per URL fileURL=URL file uploadFile=Carica file or=o +format=Formato zoomLabel=Zoom a diff --git a/locale/ja_JP/ViewerStrings.properties b/locale/ja_JP/ViewerStrings.properties index f58e4e5..f61d383 100644 --- a/locale/ja_JP/ViewerStrings.properties +++ b/locale/ja_JP/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=139.7671 locateExampleValueY=35.6809 +yesLabel=はい +noLabel=いいえ clearLabel=消去 deleteLabel=削除 loadingLabel=読み込んでいます... okLabel=OK +cancelLabel=キャンセル errorLabel=エラー problemLabel=問題 noFeatures=フィーチャは見つかりませんでした。 @@ -345,6 +348,7 @@ byURL=URL fileURL=ファイル URL uploadFile=ファイルのアップロード or=または +format=書式設定 zoomLabel=ズーム diff --git a/locale/ko_KR/ViewerStrings.properties b/locale/ko_KR/ViewerStrings.properties index 64194a6..86d82b7 100644 --- a/locale/ko_KR/ViewerStrings.properties +++ b/locale/ko_KR/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=126.9779 locateExampleValueY=37.5665 +yesLabel=예 +noLabel=아니요 clearLabel=지우기 deleteLabel=삭제 loadingLabel=로드 중... okLabel=확인 +cancelLabel=취소 errorLabel=오류 problemLabel=문제 noFeatures=피처가 없습니다. @@ -345,6 +348,7 @@ byURL=URL순 fileURL=파일 URL uploadFile=파일 업로드 or=또는 +format=형식 zoomLabel=확대 diff --git a/locale/lt_LT/ViewerStrings.properties b/locale/lt_LT/ViewerStrings.properties index 7b2003b..7a0def3 100644 --- a/locale/lt_LT/ViewerStrings.properties +++ b/locale/lt_LT/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=25.2833 locateExampleValueY=54.6833 +yesLabel=Taip +noLabel=Ne clearLabel=Naikinti deleteLabel=Trinti loadingLabel=Įkeliama... okLabel=Gerai +cancelLabel=Cancel errorLabel=Klaida problemLabel=Klaida noFeatures=Elementų nerasta. @@ -345,6 +348,7 @@ byURL=Pagal URL fileURL=Failo URL uploadFile=Įkelti failą or=arba +format=Formatuoti zoomLabel=Artinti diff --git a/locale/lv_LV/ViewerStrings.properties b/locale/lv_LV/ViewerStrings.properties index 3e27281..73e6438 100644 --- a/locale/lv_LV/ViewerStrings.properties +++ b/locale/lv_LV/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=24.1131 locateExampleValueY=56.9514 +yesLabel=Jā +noLabel=Nē clearLabel=Notīrīt deleteLabel=Izdzēst loadingLabel=Ielādē... okLabel=Labi +cancelLabel=Atcelt errorLabel=Kļūda problemLabel=Problēma noFeatures=Nav atrasti elementi. @@ -345,6 +348,7 @@ byURL=Ar URL fileURL=Faila URL uploadFile=Augšupielādēt failu or=vai +format=Formāts zoomLabel=Pietuvināt diff --git a/locale/nb_NO/ViewerStrings.properties b/locale/nb_NO/ViewerStrings.properties index dd7294d..a414af4 100644 --- a/locale/nb_NO/ViewerStrings.properties +++ b/locale/nb_NO/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=10.7276 locateExampleValueY=59.9169 +yesLabel=Ja +noLabel=Nei clearLabel=Fjern deleteLabel=Slett loadingLabel=Laster inn... okLabel=OK +cancelLabel=Avbryt errorLabel=Feil problemLabel=Problem noFeatures=Fant ingen geoobjekter. @@ -345,6 +348,7 @@ byURL=Etter URL fileURL=Fil-URL uploadFile=Last opp fil or=eller +format=Format zoomLabel=Zoom til diff --git a/locale/nl_NL/ViewerStrings.properties b/locale/nl_NL/ViewerStrings.properties index 3158e22..ee06144 100644 --- a/locale/nl_NL/ViewerStrings.properties +++ b/locale/nl_NL/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=4.884 locateExampleValueY=52.3753 +yesLabel=Ja +noLabel=Nee clearLabel=Wissen deleteLabel=Verwijderen loadingLabel=Bezig met laden... okLabel=OK +cancelLabel=Annuleren errorLabel=Fout problemLabel=Probleem noFeatures=Geen objecten gevonden. @@ -345,6 +348,7 @@ byURL=Op URL fileURL=Bestands-URL uploadFile=Bestand uploaden or=of +format=Opmaken zoomLabel=Zoomen naar diff --git a/locale/pl_PL/ViewerStrings.properties b/locale/pl_PL/ViewerStrings.properties index 089f0a0..84aa84f 100644 --- a/locale/pl_PL/ViewerStrings.properties +++ b/locale/pl_PL/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=21.011 locateExampleValueY=52.23 +yesLabel=Tak +noLabel=Nie clearLabel=Wyczyść deleteLabel=Usuń loadingLabel=Wczytywanie... okLabel=OK +cancelLabel=Anuluj errorLabel=Błąd problemLabel=Problem noFeatures=Nie odnaleziono obiektów. @@ -345,6 +348,7 @@ byURL=Według adresu URL fileURL=Adres URL pliku uploadFile=Wczytaj plik or=lub +format=Formatuj zoomLabel=Powiększ do diff --git a/locale/pt_BR/ViewerStrings.properties b/locale/pt_BR/ViewerStrings.properties index 22b46e2..7c31166 100644 --- a/locale/pt_BR/ViewerStrings.properties +++ b/locale/pt_BR/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=-43.1807 locateExampleValueY=-22.9670 +yesLabel=Sim +noLabel=Não clearLabel=Limpar deleteLabel=Excluir loadingLabel=Carregando... okLabel=OK +cancelLabel=Cancelar errorLabel=Erro problemLabel=Problema noFeatures=Nenhuma feição foi encontrada. @@ -345,6 +348,7 @@ byURL=Por URL fileURL=URL do Arquivo uploadFile=Carregar arquivo or=ou +format=Formatar zoomLabel=Zoom para diff --git a/locale/pt_PT/ViewerStrings.properties b/locale/pt_PT/ViewerStrings.properties index aff0d3b..904e32d 100644 --- a/locale/pt_PT/ViewerStrings.properties +++ b/locale/pt_PT/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=-9.1497 locateExampleValueY=38.7251 +yesLabel=Sim +noLabel=Não clearLabel=Limpar deleteLabel=Eliminar loadingLabel=A carregar... okLabel=OK +cancelLabel=Cancelar errorLabel=Erro problemLabel=Problema noFeatures=Não foram encontrados nenhuns elementos. @@ -345,6 +348,7 @@ byURL=Por URL fileURL=URL de Ficheiro uploadFile=Carregar ficheiro or=ou +format=Formatar zoomLabel=Efetuar zoom para diff --git a/locale/ro_RO/ViewerStrings.properties b/locale/ro_RO/ViewerStrings.properties index 8f961e9..dad8164 100644 --- a/locale/ro_RO/ViewerStrings.properties +++ b/locale/ro_RO/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=26.0875 locateExampleValueY=44.4275 +yesLabel=Da +noLabel=Nu clearLabel=Golire deleteLabel=Ştergere loadingLabel=Încărcare... okLabel=OK +cancelLabel=Anulare errorLabel=Eroare problemLabel=Problemă noFeatures=Nu a fost găsit niciun obiect spaţial. @@ -345,6 +348,7 @@ byURL=După URL fileURL=URL fişier uploadFile=Încărcare fişier or=sau +format=Formatare zoomLabel=Transfocare la diff --git a/locale/ru_RU/ViewerStrings.properties b/locale/ru_RU/ViewerStrings.properties index 1ccaa26..9e4aae3 100644 --- a/locale/ru_RU/ViewerStrings.properties +++ b/locale/ru_RU/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=37.6178 locateExampleValueY=55.7517 +yesLabel=Да +noLabel=Нет clearLabel=Очистить deleteLabel=Удалить loadingLabel=Загрузка... okLabel=OK +cancelLabel=Отмена errorLabel=Ошибка problemLabel=Проблема noFeatures=Объекты не найдены. @@ -345,6 +348,7 @@ byURL=По URL-адресу fileURL=URL-адрес файла uploadFile=Загрузить файл or=или +format=Форматировать zoomLabel=Приблизить к diff --git a/locale/sv_SE/ViewerStrings.properties b/locale/sv_SE/ViewerStrings.properties index 2760f43..b83fbb8 100644 --- a/locale/sv_SE/ViewerStrings.properties +++ b/locale/sv_SE/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=13.1933 locateExampleValueY=55.7058 +yesLabel=Ja +noLabel=Nej clearLabel=Radera deleteLabel=Ta bort loadingLabel=Läser in... okLabel=OK +cancelLabel=Avbryt errorLabel=Fel problemLabel=Problem noFeatures=Hittade inga objekt. @@ -345,6 +348,7 @@ byURL=Efter URL fileURL=Fil-URL uploadFile=Överför fil or=eller +format=Format zoomLabel=Zooma till diff --git a/locale/zh_CN/ViewerStrings.properties b/locale/zh_CN/ViewerStrings.properties index 8c2720b..9033b30 100644 --- a/locale/zh_CN/ViewerStrings.properties +++ b/locale/zh_CN/ViewerStrings.properties @@ -20,10 +20,13 @@ locateExampleValueX=116.3906 locateExampleValueY=39.9147 +yesLabel=是 +noLabel=否 clearLabel=清除 deleteLabel=删除 loadingLabel=正在加载... okLabel=确定 +cancelLabel=取消 errorLabel=错误 problemLabel=问题 noFeatures=未找到任何要素。 @@ -345,6 +348,7 @@ byURL=按 URL fileURL=文件 URL uploadFile=上传文件 or=或者 +format=格式 zoomLabel=缩放至 From b12b46daa49ae53e13f14ab081b539fa2eec1106 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Wed, 17 Apr 2013 18:43:36 -0700 Subject: [PATCH 39/54] Update cancelLabel --- locale/ar/ViewerStrings.properties | 2 +- locale/lt_LT/ViewerStrings.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/ar/ViewerStrings.properties b/locale/ar/ViewerStrings.properties index 74bdca1..59ed2e4 100644 --- a/locale/ar/ViewerStrings.properties +++ b/locale/ar/ViewerStrings.properties @@ -26,7 +26,7 @@ clearLabel=مسح deleteLabel=حذف loadingLabel=جاري التحميل... okLabel=موافق -cancelLabel=Cancel +cancelLabel=إلغاء errorLabel=خطأ problemLabel=مشكلة noFeatures=لم يتم العثور على معالم. diff --git a/locale/lt_LT/ViewerStrings.properties b/locale/lt_LT/ViewerStrings.properties index 7a0def3..2c432f2 100644 --- a/locale/lt_LT/ViewerStrings.properties +++ b/locale/lt_LT/ViewerStrings.properties @@ -26,7 +26,7 @@ clearLabel=Naikinti deleteLabel=Trinti loadingLabel=Įkeliama... okLabel=Gerai -cancelLabel=Cancel +cancelLabel=Atšaukti errorLabel=Klaida problemLabel=Klaida noFeatures=Elementų nerasta. From 9fddf8e46a4d23e54ebe6f338d0a2b66dd0da54c Mon Sep 17 00:00:00 2001 From: jcfranco Date: Thu, 18 Apr 2013 14:47:06 -0700 Subject: [PATCH 40/54] Inline logic for updating overview graphic visibility. --- src/widgets/OverviewMap/OverviewMapComponent.mxml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/widgets/OverviewMap/OverviewMapComponent.mxml b/src/widgets/OverviewMap/OverviewMapComponent.mxml index f6059a6..2f91c0f 100644 --- a/src/widgets/OverviewMap/OverviewMapComponent.mxml +++ b/src/widgets/OverviewMap/OverviewMapComponent.mxml @@ -374,6 +374,8 @@ { overviewMap.extent = map.extent.expand(3); overviewGraphic.geometry = map.visibleArea; + //hide overview box if larger than overview map + overviewGraphic.visible = overviewMap.extent.contains(overviewGraphic.geometry); } private function updateMapExtentFromOverview():void @@ -384,13 +386,6 @@ private function map_extentChangeHandler(event:ExtentEvent):void { updateOverviewExtentFromMap(); - updateOverviewGraphicVisibility(); - } - - private function updateOverviewGraphicVisibility():void - { - //hide overview box if larger than overview map - overviewGraphic.visible = overviewMap.extent.contains(overviewGraphic.geometry); } private function overviewMap_loadHandler(event:MapEvent):void @@ -409,7 +404,6 @@ map.addEventListener(ExtentEvent.EXTENT_CHANGE, map_extentChangeHandler); updateOverviewExtentFromMap(); - updateOverviewGraphicVisibility(); } private function overviewMap_mouseRollOutHandler(event:MouseEvent):void From ca71db8d9eb074086be3ded8c34f5666cbcba386 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Thu, 18 Apr 2013 15:03:01 -0700 Subject: [PATCH 41/54] Clean up imports. --- src/widgets/OverviewMap/OverviewMapComponent.mxml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/widgets/OverviewMap/OverviewMapComponent.mxml b/src/widgets/OverviewMap/OverviewMapComponent.mxml index 2f91c0f..9956123 100644 --- a/src/widgets/OverviewMap/OverviewMapComponent.mxml +++ b/src/widgets/OverviewMap/OverviewMapComponent.mxml @@ -29,7 +29,6 @@ import com.esri.ags.Map; import com.esri.ags.events.ExtentEvent; import com.esri.ags.events.MapEvent; - import com.esri.ags.geometry.Extent; import com.esri.ags.geometry.MapPoint; import com.esri.ags.geometry.Polygon; import com.esri.ags.layers.ArcGISDynamicMapServiceLayer; From 5a8d6e12575011c19ded494ddb3da267d01a0e02 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Thu, 18 Apr 2013 15:08:31 -0700 Subject: [PATCH 42/54] Reorder methods based on usage. --- .../OverviewMap/OverviewMapComponent.mxml | 134 +++++++++--------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/src/widgets/OverviewMap/OverviewMapComponent.mxml b/src/widgets/OverviewMap/OverviewMapComponent.mxml index 9956123..4dd9f02 100644 --- a/src/widgets/OverviewMap/OverviewMapComponent.mxml +++ b/src/widgets/OverviewMap/OverviewMapComponent.mxml @@ -369,22 +369,55 @@ } } - private function updateOverviewExtentFromMap():void + private function viewContainer_basemapSwitchHandler(event:AppEvent):void { - overviewMap.extent = map.extent.expand(3); - overviewGraphic.geometry = map.visibleArea; - //hide overview box if larger than overview map - overviewGraphic.visible = overviewMap.extent.contains(overviewGraphic.geometry); + baseMapSwitched = true; + currentBaseMapId = event.data as String; + if (currentState == "expanded" || currentState == "noncollapsible") + { + showCurrentBaseMap(currentBaseMapId); + } } - private function updateMapExtentFromOverview():void + private function showCurrentBaseMap(currentBaseMapId:String):void { - map.center = overviewGraphic.geometry.extent.center; - } + var configBasemaps:Array = configData.basemaps; - private function map_extentChangeHandler(event:ExtentEvent):void - { - updateOverviewExtentFromMap(); + if (currentBaseMapId) + { + var selectedLabel:String; + for (var i:uint = 0; i < configBasemaps.length; i++) + { + if (configBasemaps[i].id == currentBaseMapId) + { + selectedLabel = configBasemaps[i].label; + break; + } + } + if (selectedLabel) + { + // turn on the selected basemap layers (more than one layer can have the same label) + var layers:ArrayCollection = overviewMap.layers as ArrayCollection; + for (i = 0; i < configBasemaps.length; i++) + { + var basemapLabel:String = configBasemaps[i].label; + for each (var layer:Layer in layers) + { + if (layer.id == basemapLabel) + { + if (layer.id == selectedLabel) + { + layer.visible = true; + } + else + { + layer.visible = false; + } + } + } + } + } + } } private function overviewMap_loadHandler(event:MapEvent):void @@ -405,19 +438,6 @@ updateOverviewExtentFromMap(); } - private function overviewMap_mouseRollOutHandler(event:MouseEvent):void - { - overviewMap.removeEventListener(MouseEvent.MOUSE_MOVE, overviewMap_mouseMoveHandler); - overviewMap.removeEventListener(MouseEvent.MOUSE_UP, overviewMap_mouseUpHandler); - overviewGraphic.addEventListener(MouseEvent.MOUSE_DOWN, overviewGraphic_mouseDownHandler); - - if (hasOverviewGraphicBeenMoved) - { - hasOverviewGraphicBeenMoved = false; - updateMapExtentFromOverview(); - } - } - private function overviewGraphic_mouseDownHandler(event:MouseEvent):void { overviewGraphic.removeEventListener(MouseEvent.MOUSE_DOWN, overviewGraphic_mouseDownHandler); @@ -454,7 +474,7 @@ overviewGraphic.refresh(); } - private function overviewMap_mouseUpHandler(event:MouseEvent):void + private function overviewMap_mouseRollOutHandler(event:MouseEvent):void { overviewMap.removeEventListener(MouseEvent.MOUSE_MOVE, overviewMap_mouseMoveHandler); overviewMap.removeEventListener(MouseEvent.MOUSE_UP, overviewMap_mouseUpHandler); @@ -467,57 +487,37 @@ } } - private function viewContainer_basemapSwitchHandler(event:AppEvent):void + private function updateMapExtentFromOverview():void { - baseMapSwitched = true; - currentBaseMapId = event.data as String; - if (currentState == "expanded" || currentState == "noncollapsible") - { - showCurrentBaseMap(currentBaseMapId); - } + map.center = overviewGraphic.geometry.extent.center; } - private function showCurrentBaseMap(currentBaseMapId:String):void + private function overviewMap_mouseUpHandler(event:MouseEvent):void { - var configBasemaps:Array = configData.basemaps; + overviewMap.removeEventListener(MouseEvent.MOUSE_MOVE, overviewMap_mouseMoveHandler); + overviewMap.removeEventListener(MouseEvent.MOUSE_UP, overviewMap_mouseUpHandler); + overviewGraphic.addEventListener(MouseEvent.MOUSE_DOWN, overviewGraphic_mouseDownHandler); - if (currentBaseMapId) + if (hasOverviewGraphicBeenMoved) { - var selectedLabel:String; - for (var i:uint = 0; i < configBasemaps.length; i++) - { - if (configBasemaps[i].id == currentBaseMapId) - { - selectedLabel = configBasemaps[i].label; - break; - } - } - if (selectedLabel) - { - // turn on the selected basemap layers (more than one layer can have the same label) - var layers:ArrayCollection = overviewMap.layers as ArrayCollection; - for (i = 0; i < configBasemaps.length; i++) - { - var basemapLabel:String = configBasemaps[i].label; - for each (var layer:Layer in layers) - { - if (layer.id == basemapLabel) - { - if (layer.id == selectedLabel) - { - layer.visible = true; - } - else - { - layer.visible = false; - } - } - } - } - } + hasOverviewGraphicBeenMoved = false; + updateMapExtentFromOverview(); } } + private function map_extentChangeHandler(event:ExtentEvent):void + { + updateOverviewExtentFromMap(); + } + + private function updateOverviewExtentFromMap():void + { + overviewMap.extent = map.extent.expand(3); + overviewGraphic.geometry = map.visibleArea; + //hide overview box if larger than overview map + overviewGraphic.visible = overviewMap.extent.contains(overviewGraphic.geometry); + } + private function sequence_effectStartHandler(event:EffectEvent):void { if (currentState == "expanded" || currentState == "noncollapsible") From c3f916ea5c6bfaac92e14b7d0eaea322a7b46f2b Mon Sep 17 00:00:00 2001 From: jcfranco Date: Thu, 18 Apr 2013 15:25:46 -0700 Subject: [PATCH 43/54] Add OverviewMapWidget extent handlers when map loads. --- .../OverviewMap/OverviewMapComponent.mxml | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/widgets/OverviewMap/OverviewMapComponent.mxml b/src/widgets/OverviewMap/OverviewMapComponent.mxml index 4dd9f02..2e0af99 100644 --- a/src/widgets/OverviewMap/OverviewMapComponent.mxml +++ b/src/widgets/OverviewMap/OverviewMapComponent.mxml @@ -434,8 +434,14 @@ graphicsLayer.add(overviewGraphic); - map.addEventListener(ExtentEvent.EXTENT_CHANGE, map_extentChangeHandler); - updateOverviewExtentFromMap(); + if (map.loaded) + { + trackMapExtent(); + } + else + { + map.addEventListener(MapEvent.LOAD, map_loadHandler); + } } private function overviewGraphic_mouseDownHandler(event:MouseEvent):void @@ -505,8 +511,9 @@ } } - private function map_extentChangeHandler(event:ExtentEvent):void + private function trackMapExtent():void { + map.addEventListener(ExtentEvent.EXTENT_CHANGE, map_extentChangeHandler); updateOverviewExtentFromMap(); } @@ -518,6 +525,17 @@ overviewGraphic.visible = overviewMap.extent.contains(overviewGraphic.geometry); } + private function map_extentChangeHandler(event:ExtentEvent):void + { + updateOverviewExtentFromMap(); + } + + private function map_loadHandler(event:MapEvent):void + { + map.removeEventListener(MapEvent.LOAD, map_loadHandler); + trackMapExtent(); + } + private function sequence_effectStartHandler(event:EffectEvent):void { if (currentState == "expanded" || currentState == "noncollapsible") From 126532d5ca11ece0a3713025e7399fb49f39fb69 Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Thu, 18 Apr 2013 16:08:46 -0700 Subject: [PATCH 44/54] don't create legend swatch for text symbol --- .../toc/tocClasses/TocItemRenderer.as | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as b/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as index 3ea1884..445420d 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as @@ -18,7 +18,6 @@ package com.esri.viewer.components.toc.tocClasses import com.esri.ags.layers.Layer; import com.esri.ags.layers.TiledMapServiceLayer; -import com.esri.ags.symbols.CompositeSymbol; import com.esri.ags.symbols.Symbol; import com.esri.viewer.AppEvent; import com.esri.viewer.components.toc.TOC; @@ -31,6 +30,7 @@ import mx.controls.Image; import mx.controls.treeClasses.TreeItemRenderer; import mx.controls.treeClasses.TreeListData; import mx.core.FlexGlobals; +import mx.core.UIComponent; import spark.components.Group; @@ -94,12 +94,17 @@ public class TocItemRenderer extends TreeItemRenderer super.data = value; if (value is TocLegendItem) - { + { + _legendSwatchContainer.removeAllElements(); + var symbol:Symbol = TocLegendItem(value).legendItemInfo.symbol; - if (symbol && !(symbol is CompositeSymbol)) - { - _legendSwatchContainer.removeAllElements(); - _legendSwatchContainer.addElement(symbol.createSwatch(LEGEND_SWATCH_SIZE, LEGEND_SWATCH_SIZE)); + if (symbol) + { + var swatch:UIComponent = symbol.createSwatch(LEGEND_SWATCH_SIZE, LEGEND_SWATCH_SIZE); + if (swatch) + { + _legendSwatchContainer.addElement(swatch); + } } } } From dae751d4c56af362e582f3ffde0a6ef1425b58ec Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Thu, 18 Apr 2013 16:19:30 -0700 Subject: [PATCH 45/54] submit/cancel buttons are visible when adding attachments with long filenames --- ...tributeTableWidgetAttachmentInspectorSkin.mxml | 15 +++++++++++---- .../Edit/EditWidgetAttachmentInspectorSkin.mxml | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml b/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml index 59f18f6..f896f5e 100644 --- a/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml @@ -223,10 +223,17 @@ includeInLayout="{hostComponent.addEnabled && hostComponent.featureLayer.isUpdateAllowed(hostComponent.feature)}" label="{chooseFileText}" visible="{hostComponent.addEnabled && hostComponent.featureLayer.isUpdateAllowed(hostComponent.feature)}"/> - - - - + + + + - - - - + + + + Date: Fri, 19 Apr 2013 13:57:38 -0700 Subject: [PATCH 46/54] Improved strings for Estonian, Hebrew, Lithuanian --- locale/et_EE/ViewerStrings.properties | 26 +++++++++++++------------- locale/he_IL/ViewerStrings.properties | 2 +- locale/lt_LT/ViewerStrings.properties | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/locale/et_EE/ViewerStrings.properties b/locale/et_EE/ViewerStrings.properties index 0e48f28..a864451 100644 --- a/locale/et_EE/ViewerStrings.properties +++ b/locale/et_EE/ViewerStrings.properties @@ -65,8 +65,8 @@ tocMapLayerZoomToLabel=Suumi tocMapLayerTransparencyLabel=Läbipaistvus tocMapLayerOpaqueLabel=Läbipaistmatu tocMapLayerTransparentLabel=Läbipaistvus -tocMapLayerMoveUpLabel=Liiguta üles -tocMapLayerMoveDownLabel=Liiguta alla +tocMapLayerMoveUpLabel=Liiguta ülespoole +tocMapLayerMoveDownLabel=Liiguta allapoole tocMapLayerRemoveLabel=Eemalda tocMapLayerDescriptionLabel=Kirjeldus tocMapLayerDownloadLabel=Lae alla @@ -178,11 +178,11 @@ textFont4=Comic Sans MS textFont5=Algerian textFont6=Verdana -lineStyleSolid=Pidev -lineStyleDash=Kriipsudega -lineStyleDot=Punktidega -lineStyleDashDot=Kriips punkt -lineStyleDashDotDot=Kriips punkt punkt +lineStyleSolid=Pidevjoon +lineStyleDash=Kriipsjoon +lineStyleDot=Punktiirjoon +lineStyleDashDot=Kriips-punkt +lineStyleDashDotDot=Kriips-punkt-punkt fillStyleSolid=Pidev fillStyleBackwardDiagonal=Tagurpidine diagonaal @@ -204,9 +204,9 @@ textColorLabel=Värv textFontLabel=Kirjastiil textSizeLabel=Suurus textBoldLabel=B -textBoldTooltip=Bold +textBoldTooltip=Rasvane textItalicLabel=I -textItalicTooltip=Italic +textItalicTooltip=Kursiiv textUnderlineLabel=U textUnderlineTooltip=Allajoonitud lineAlphaLabel=Alfa @@ -298,7 +298,7 @@ printTitleLabel=Pealkiri printSubtitleLabel=Alampealkiri printCopyrightLabel=Autoriõigused printAuthorLabel=Autor -printLayoutTemplatesLabel=Kujunduse mallid +printLayoutTemplatesLabel=Paigutuse mallid printFormatsLabel=Formaadid printScaleLabel=Kasuta seda mõõtkava @@ -312,8 +312,8 @@ featuresFoundLabel=Leitud objekte: {0} drivingDirectionLabel=Marsruutimise juhised routeSubmitLabel=Hangi juhised -moveUpTooltip=Liiguta üles -moveDownTooltip=Liiguta alla +moveUpTooltip=Liiguta ülespoole +moveDownTooltip=Liiguta allapoole addLocationTooltip=asukoha lisamiseks kliki kaardil optionsLabel=Seaded bestSequenceLabel=Leia parim järjekord @@ -351,7 +351,7 @@ or=või format=Formaat -zoomLabel=Suumi juurde +zoomLabel=Suumi helloContent=Muutke see tekst config failis. diff --git a/locale/he_IL/ViewerStrings.properties b/locale/he_IL/ViewerStrings.properties index f7e7973..ba10c81 100644 --- a/locale/he_IL/ViewerStrings.properties +++ b/locale/he_IL/ViewerStrings.properties @@ -123,7 +123,7 @@ configFileCrossDomain=כנראה נושא crossdomain : {0}{1} openToolTip=לחץ לפתיחת מפת התמצאות -closeToolTip=לחץ לפתיחת מפת התמצאות +closeToolTip=לחץ לסגירת מפת התמצאות layerListLabel=עוד... diff --git a/locale/lt_LT/ViewerStrings.properties b/locale/lt_LT/ViewerStrings.properties index 2c432f2..98d27e1 100644 --- a/locale/lt_LT/ViewerStrings.properties +++ b/locale/lt_LT/ViewerStrings.properties @@ -294,7 +294,7 @@ printSubmitLabel=Spausdinimas printTitle= printSubtitle= printCopyright= -printTitleLabel=Pavadinimas +printTitleLabel=Antraštė printSubtitleLabel=Poraštė printCopyrightLabel=Teisės printAuthorLabel=Autorius @@ -329,7 +329,7 @@ graphicalsearchLabel=Išrinkti elementus pagal textsearchLabel=Išrinkti pagal atributus layerLabel=Sluoksnis nolayerLabel=Nepasirinktas paieškos sluoksnis -searchSubmitLabel=Išrinkti +searchSubmitLabel=Ieškoti selectionLabel=Išrinkti elementai: @@ -357,7 +357,7 @@ zoomLabel=Artinti helloContent=Pakeiskite šį tekstą konfigūracijos faile. -widgetIDWidgetLabelTemplate=Įrankis: {0}, antraštė: {1} +widgetIDWidgetLabelTemplate=Įrankis: {0}, etiketė: {1} widgetIDWidgetStateTemplate=Įrankis: {0}, būsena: {1} itemLabelWidgetIDItemIDTemplate={0} Įrankio ID: {1} From 94c585350ba44749149ea1f15ad812a36450f662 Mon Sep 17 00:00:00 2001 From: Sarthak Datt Date: Mon, 22 Apr 2013 14:18:06 -0700 Subject: [PATCH 47/54] clean-up; improved experience when adding attachments with long names --- .../AttributeTable/AttributeTableWidget.mxml | 2 +- ...uteTableWidgetAttachmentInspectorSkin.mxml | 22 +++++++++------- .../EditWidgetAttachmentInspectorSkin.mxml | 26 ++++++++++++------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/widgets/AttributeTable/AttributeTableWidget.mxml b/src/widgets/AttributeTable/AttributeTableWidget.mxml index e39a5cd..ecce1ff 100644 --- a/src/widgets/AttributeTable/AttributeTableWidget.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidget.mxml @@ -1283,7 +1283,7 @@ if (5 <= viewStack.numChildren) { tabBar.percentWidth = 100; - tabBar.right = 150; + tabBar.right = 500; } else { diff --git a/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml b/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml index f896f5e..5c317cd 100644 --- a/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml @@ -38,16 +38,13 @@ - + showTruncationTip="true" + text="{noAttachmentsText}" + textAlign="center"/> - @@ -200,8 +202,6 @@ isEditable="{hostComponent.featureLayer.isEditable}" itemRenderer="com.esri.viewer.skins.supportClasses.AttachmentRenderer" keyUp="attachmentInfoList_keyUpHandler(event)" - minHeight="140" - minWidth="200" useVirtualLayout="false"> - + maxDisplayedLines="1" + paddingTop="5" + showTruncationTip="true" + text="{noAttachmentsText}" + textAlign="center"/> Date: Mon, 22 Apr 2013 11:48:09 -0700 Subject: [PATCH 48/54] Apply initial extent, if defined, on startup. * Extract logic for applying center point. * Use mx.rpc.Responder wherever applicable. * Clean up function naming. --- src/com/esri/viewer/managers/MapManager.mxml | 133 +++++++++++-------- 1 file changed, 81 insertions(+), 52 deletions(-) diff --git a/src/com/esri/viewer/managers/MapManager.mxml b/src/com/esri/viewer/managers/MapManager.mxml index cead3c5..a2e8617 100644 --- a/src/com/esri/viewer/managers/MapManager.mxml +++ b/src/com/esri/viewer/managers/MapManager.mxml @@ -90,6 +90,8 @@ Class used to configure the viewer map component (including layers) and handle m import mx.rpc.AsyncResponder; import mx.rpc.AsyncToken; import mx.rpc.Fault; + import mx.rpc.IResponder; + import mx.rpc.Responder; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.http.HTTPService; @@ -429,57 +431,29 @@ Class used to configure the viewer map component (including layers) and handle m { map.removeEventListener(MapEvent.LOAD, map_loadHandler); - var center:String; - var level:Number; - var scale:Number; - for (var i:int = 0; i < m_configData.mapAttrs.length; i++) + if (m_initialExtent) { - var id:String = m_configData.mapAttrs[i].id; - - if (id == "center") - { - center = m_configData.mapAttrs[i].center; - } - else if (id == "level") - { - level = parseInt(m_configData.mapAttrs[i].level); - } - else if (id == "scale") - { - scale = parseFloat(m_configData.mapAttrs[i].scale); - } + project(m_initialExtent, new mx.rpc.Responder(project_resultHandler, + project_faultHandler)); } - if (center) + else { - var centerPoint:MapPoint = createMapPoint(center.split(" ")); - if (centerPoint) - { - projectAndApply(centerPoint, - function applyCenterProperties(center:MapPoint):void - { - map.centerAt(center); - if (scale > 0) - { - map.scale = scale; - } - else if (level >= 0) - { - map.level = level; - } - }); - } + applyCenter(); } - else if (m_initialExtent) + + function project_resultHandler(extent:Extent):void { - projectAndApply(m_initialExtent, - function applyExtentProperties(extent:Extent):void - { - map.extent = extent; - }); + map.extent = extent; + applyCenter(); + } + + function project_faultHandler(fault:Fault):void + { + applyCenter(); } } - private function projectAndApply(geometry:Geometry, resultHandler:Function):void + private function project(geometry:Geometry, responder:IResponder):void { var canApplyDirectlyToMap:Boolean = !geometry.spatialReference || map.spatialReference.equals(geometry.spatialReference) @@ -487,17 +461,17 @@ Class used to configure the viewer map component (including layers) and handle m if (canApplyDirectlyToMap) { - resultHandler(geometry); + responder.result(geometry); } else if (map.spatialReference.isWebMercator() && geometry.spatialReference.wkid == 4326) { - resultHandler(WebMercatorUtil.geographicToWebMercator(geometry)); + responder.result(WebMercatorUtil.geographicToWebMercator(geometry)); } else if (map.spatialReference.wkid == 4326 && geometry.spatialReference.isWebMercator()) { - resultHandler(WebMercatorUtil.webMercatorToGeographic(geometry)); + responder.result(WebMercatorUtil.webMercatorToGeographic(geometry)); } else { @@ -505,19 +479,74 @@ Class used to configure the viewer map component (including layers) and handle m projectParams.geometries = [ geometry ]; projectParams.outSpatialReference = map.spatialReference; GeometryServiceSingleton.instance.project( - projectParams, new AsyncResponder(projectionSuccessHandler, - projectionFailureHandler)); + projectParams, new mx.rpc.Responder(projectionSuccessHandler, + projectionFailureHandler)); + + function projectionSuccessHandler(geometries:Array):void + { + responder.result(geometries[0]); + } + + function projectionFailureHandler(fault:Fault):void + { + responder.fault(fault); + } + } + } - function projectionSuccessHandler(geometries:Array, token:Object = null):void + private function applyCenter():void + { + var center:String; + var level:Number; + var scale:Number; + + for (var i:int = 0; i < m_configData.mapAttrs.length; i++) + { + var id:String = m_configData.mapAttrs[i].id; + + if (id == "center") + { + center = m_configData.mapAttrs[i].center; + } + else if (id == "level") { - resultHandler(geometries[0]); + level = parseInt(m_configData.mapAttrs[i].level); } + else if (id == "scale") + { + scale = parseFloat(m_configData.mapAttrs[i].scale); + } + } + + if (!center) + { + return; + } - function projectionFailureHandler(fault:Fault, token:Object = null):void + var centerPoint:MapPoint = createMapPoint(center.split(" ")); + if (!centerPoint) + { + return; + } + + project(centerPoint, + new mx.rpc.Responder(project_resultHandler, + project_faultHandler)); + + function project_resultHandler(center:MapPoint):void + { + map.centerAt(center); + if (scale > 0) + { + map.scale = scale; + } + else if (level >= 0) { - //ignore error + map.level = level; } } + + function project_faultHandler(fault:Fault):void {} } private function createMapPoint(textualMapPointAttributes:Array):MapPoint From 77bc5cc074e989ed4c7e353f3a99aff3e902e785 Mon Sep 17 00:00:00 2001 From: Dasa Paddock Date: Mon, 22 Apr 2013 16:51:24 -0700 Subject: [PATCH 49/54] format --- .../viewer/components/toc/tocClasses/TocItemRenderer.as | 8 ++++---- .../viewer/components/toc/tocClasses/TocMapLayerItem.as | 2 +- src/widgets/AttributeTable/AttributeTableWidget.mxml | 8 ++++---- .../AttributeTableWidgetAttachmentInspectorSkin.mxml | 4 ++-- src/widgets/Edit/EditWidget.mxml | 4 ++-- src/widgets/Edit/EditWidgetAttachmentInspectorSkin.mxml | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as b/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as index 445420d..4ae3273 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocItemRenderer.as @@ -94,15 +94,15 @@ public class TocItemRenderer extends TreeItemRenderer super.data = value; if (value is TocLegendItem) - { + { _legendSwatchContainer.removeAllElements(); - + var symbol:Symbol = TocLegendItem(value).legendItemInfo.symbol; if (symbol) - { + { var swatch:UIComponent = symbol.createSwatch(LEGEND_SWATCH_SIZE, LEGEND_SWATCH_SIZE); if (swatch) - { + { _legendSwatchContainer.addElement(swatch); } } diff --git a/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as b/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as index 5832440..3518de0 100644 --- a/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as +++ b/src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as @@ -233,7 +233,7 @@ public class TocMapLayerItem extends TocItem { var actualVisibleLayers:Array = getActualVisibleLayers(ArcGISDynamicMapServiceLayer(layer).visibleLayers.toArray(), _dynamicMapServiceLayerInfos); for each (var child:TocLayerInfoItem in children) - { + { updateTOCItemVisibility(child, actualVisibleLayers); } } diff --git a/src/widgets/AttributeTable/AttributeTableWidget.mxml b/src/widgets/AttributeTable/AttributeTableWidget.mxml index ecce1ff..62b5688 100644 --- a/src/widgets/AttributeTable/AttributeTableWidget.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidget.mxml @@ -50,7 +50,7 @@ import com.esri.ags.layers.supportClasses.LayerInfo; import com.esri.ags.tasks.JSONTask; import com.esri.viewer.utils.MapServiceUtil; - + import mx.binding.utils.ChangeWatcher; import mx.collections.ArrayCollection; import mx.containers.ViewStack; @@ -409,7 +409,7 @@ jsonTask.execute(urlVars, new AsyncResponder(jsonTask_resultHandler, jsonTask_faultHandler)); function jsonTask_resultHandler(resultObject:Object, token:Object = null):void - { + { var layers:Array = resultObject.layers; if (layers && layers.length) { @@ -422,7 +422,7 @@ } } function jsonTask_faultHandler(fault:Fault, token:Object = null):void - { + { var layers:Array = []; for each (var layerInfo:LayerInfo in layer.layerInfos) { @@ -477,7 +477,7 @@ var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; if (!arcGISDynamicMapServiceLayer.visibleLayers) - { + { var visLayers:Array = getActualVisibleLayers(MapServiceUtil.getVisibleSubLayers(copyLayerInfos), copyLayerInfos); arcGISDynamicMapServiceLayer.visibleLayers = new ArrayCollection(visLayers); } diff --git a/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml b/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml index 5c317cd..47841fd 100644 --- a/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml +++ b/src/widgets/AttributeTable/AttributeTableWidgetAttachmentInspectorSkin.mxml @@ -41,10 +41,10 @@ import com.esri.ags.layers.supportClasses.AttachmentInfo; import com.esri.ags.skins.supportClasses.AttachmentMouseEvent; import com.esri.viewer.utils.LocalizationUtil; - + import mx.binding.utils.ChangeWatcher; import mx.events.FlexEvent; - + import spark.components.DataGroup; import spark.components.HScrollBar; import spark.events.IndexChangeEvent; diff --git a/src/widgets/Edit/EditWidget.mxml b/src/widgets/Edit/EditWidget.mxml index 6367fc7..e222660 100644 --- a/src/widgets/Edit/EditWidget.mxml +++ b/src/widgets/Edit/EditWidget.mxml @@ -58,7 +58,7 @@ import com.esri.ags.tasks.JSONTask; import com.esri.viewer.AppEvent; import com.esri.viewer.utils.MapServiceUtil; - + import mx.binding.utils.ChangeWatcher; import mx.collections.ArrayCollection; import mx.core.FlexGlobals; @@ -541,7 +541,7 @@ var copyLayerInfos:Array = arcGISDynamicMapServiceLayer.layerInfos; if (!arcGISDynamicMapServiceLayer.visibleLayers) - { + { var visLayers:Array = getActualVisibleLayers(MapServiceUtil.getVisibleSubLayers(copyLayerInfos), copyLayerInfos); arcGISDynamicMapServiceLayer.visibleLayers = new ArrayCollection(visLayers); } diff --git a/src/widgets/Edit/EditWidgetAttachmentInspectorSkin.mxml b/src/widgets/Edit/EditWidgetAttachmentInspectorSkin.mxml index 70bce7f..c587c8a 100644 --- a/src/widgets/Edit/EditWidgetAttachmentInspectorSkin.mxml +++ b/src/widgets/Edit/EditWidgetAttachmentInspectorSkin.mxml @@ -41,10 +41,10 @@ import com.esri.ags.layers.supportClasses.AttachmentInfo; import com.esri.ags.skins.supportClasses.AttachmentMouseEvent; import com.esri.viewer.utils.LocalizationUtil; - + import mx.binding.utils.ChangeWatcher; import mx.events.FlexEvent; - + import spark.components.DataGroup; import spark.components.HScrollBar; import spark.events.IndexChangeEvent; @@ -237,7 +237,7 @@ - + Date: Mon, 22 Apr 2013 14:46:43 -0700 Subject: [PATCH 50/54] Fetch and store param metadata. --- .../Geoprocessing/GeoprocessingWidget.mxml | 26 ++++++++++++++++++- .../Geoprocessing/parameters/BaseParameter.as | 16 ++++++++++++ .../Geoprocessing/parameters/IGPParameter.as | 2 ++ .../supportClasses/GPParamHandler.as | 22 ++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/widgets/Geoprocessing/GeoprocessingWidget.mxml b/src/widgets/Geoprocessing/GeoprocessingWidget.mxml index d73d705..fd3d26b 100644 --- a/src/widgets/Geoprocessing/GeoprocessingWidget.mxml +++ b/src/widgets/Geoprocessing/GeoprocessingWidget.mxml @@ -195,7 +195,7 @@ inputLabel = configXML.labels.inputlabel || getDefaultString("inputLabel"); outputLabel = configXML.labels.outputlabel || getDefaultString("outputLabel"); - fetchGPServerDescription(); + fetchGPTaskInfo(); } catch (error:Error) { @@ -204,6 +204,30 @@ } } + private function fetchGPTaskInfo():void + { + var taskInfoRequest:JSONTask = new JSONTask(); + var urlVars:URLVariables = new URLVariables(); + urlVars.f = "json"; + taskInfoRequest.url = gp.url; + taskInfoRequest.proxyURL = gp.proxyURL; + taskInfoRequest.execute(urlVars, new AsyncResponder(taskInfoRequest_resultHandler, + taskInfoRequest_faultHandler)); + } + + private function taskInfoRequest_resultHandler(taskInfo:Object, token:Object = null):void + { + gpParamHandler.setTaskInfo(taskInfo); + fetchGPServerDescription(); + } + + private function taskInfoRequest_faultHandler(fault:Fault, token:Object = null):void + { + //Could not fetch task capabilities + //handle silently since task info not required + fetchGPServerDescription(); + } + private function fetchGPServerDescription():void { var gpServerInspector:JSONTask = new JSONTask(); diff --git a/src/widgets/Geoprocessing/parameters/BaseParameter.as b/src/widgets/Geoprocessing/parameters/BaseParameter.as index f29cbd8..9f5a47f 100644 --- a/src/widgets/Geoprocessing/parameters/BaseParameter.as +++ b/src/widgets/Geoprocessing/parameters/BaseParameter.as @@ -40,6 +40,22 @@ public class BaseParameter implements IGPParameter _serviceInfo = value; } + //---------------------------------- + // paramInfo + //---------------------------------- + + private var _paramInfo:Object; + + public function get paramInfo():Object + { + return _paramInfo ||= {}; + } + + public function set paramInfo(value:Object):void + { + _paramInfo = value; + } + //---------------------------------- // label //---------------------------------- diff --git a/src/widgets/Geoprocessing/parameters/IGPParameter.as b/src/widgets/Geoprocessing/parameters/IGPParameter.as index 27dd1d8..b153184 100644 --- a/src/widgets/Geoprocessing/parameters/IGPParameter.as +++ b/src/widgets/Geoprocessing/parameters/IGPParameter.as @@ -20,6 +20,8 @@ public interface IGPParameter { function get serviceInfo():Object; function set serviceInfo(value:Object):void; + function get paramInfo():Object; + function set paramInfo(value:Object):void; function get name():String; function get label():String; diff --git a/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as b/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as index 91cf9e3..5487997 100644 --- a/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as +++ b/src/widgets/Geoprocessing/supportClasses/GPParamHandler.as @@ -442,5 +442,27 @@ public class GPParamHandler return hasUploadCompatibleInputParam; } + + public function setTaskInfo(taskInfo:Object):void + { + if (!taskInfo || !taskInfo.parameters) + { + return; + } + + var allParams:Array = _inputParams.concat(_outputParams); + + for each (var param:IGPParameter in allParams) + { + for each (var paramInfo:Object in taskInfo.parameters) + { + if (param.name == paramInfo.name) + { + param.paramInfo = paramInfo; + break; + } + } + } + } } } From cb9663d1734b0fb943752b8eeb24418aa9049639 Mon Sep 17 00:00:00 2001 From: jcfranco Date: Mon, 22 Apr 2013 16:24:34 -0700 Subject: [PATCH 51/54] Configure FeatureLayerParam out fields & layer definition fields. --- .../parameters/FeatureLayerParameter.as | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/widgets/Geoprocessing/parameters/FeatureLayerParameter.as b/src/widgets/Geoprocessing/parameters/FeatureLayerParameter.as index 5365ca1..e2cf468 100644 --- a/src/widgets/Geoprocessing/parameters/FeatureLayerParameter.as +++ b/src/widgets/Geoprocessing/parameters/FeatureLayerParameter.as @@ -66,6 +66,7 @@ public class FeatureLayerParameter extends BaseParameter implements IGPFeaturePa { _layer = new FeatureLayer(); _layer.featureCollection = new FeatureCollection(new FeatureSet([]), new LayerDetails()); + _layer.outFields = [ "*" ]; } //-------------------------------------------------------------------------- @@ -272,6 +273,19 @@ public class FeatureLayerParameter extends BaseParameter implements IGPFeaturePa // //-------------------------------------------------------------------------- + override public function set paramInfo(value:Object):void + { + if (value) + { + super.paramInfo = value; + if (value.defaultValue) + { + var featureSet:FeatureSet = FeatureSet.fromJSON(value.defaultValue); + layer.featureCollection.layerDefinition.fields = featureSet.fields; + } + } + } + override public function hasValidValue():Boolean { return _layer.featureCollection.featureSet.features.length > 0; From 1393ca16c4ee06632f5d1274f7271ae93e3fdc47 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Mon, 22 Apr 2013 18:15:57 -0700 Subject: [PATCH 52/54] Updated Arabic translations --- locale/ar/ViewerStrings.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/ar/ViewerStrings.properties b/locale/ar/ViewerStrings.properties index 59ed2e4..1741d5b 100644 --- a/locale/ar/ViewerStrings.properties +++ b/locale/ar/ViewerStrings.properties @@ -34,11 +34,11 @@ resultsLabel=النتائج saveLabel=حفظ -unitsFeet=قدم +unitsFeet=أقدام unitsFeetAbbr=ق -unitsKilometers=كيلومتر +unitsKilometers=كيلومترات unitsKilometersAbbr=كم -unitsMeters=متر +unitsMeters=أمتار unitsMetersAbbr=م unitsMiles=أميال unitsMilesAbbr=ميل From 5c1b4a9713c10315caa04d27772431a1566e872c Mon Sep 17 00:00:00 2001 From: jcfranco Date: Tue, 23 Apr 2013 11:51:28 -0700 Subject: [PATCH 53/54] Add token, if it exists, to GP file upload request. --- .../renderers/input/GPInputDataFileParamItemRenderer.mxml | 7 +++++++ .../input/GPInputRasterDataLayerParamItemRenderer.mxml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/widgets/Geoprocessing/renderers/input/GPInputDataFileParamItemRenderer.mxml b/src/widgets/Geoprocessing/renderers/input/GPInputDataFileParamItemRenderer.mxml index a9df7ad..f769dd9 100644 --- a/src/widgets/Geoprocessing/renderers/input/GPInputDataFileParamItemRenderer.mxml +++ b/src/widgets/Geoprocessing/renderers/input/GPInputDataFileParamItemRenderer.mxml @@ -23,6 +23,8 @@ autoDrawBackground="false"> Date: Tue, 23 Apr 2013 15:41:16 -0700 Subject: [PATCH 54/54] Updated getting started for fork/clone --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 52a00ad..31eaeea 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,22 @@ This is the source code for the ArcGIS Viewer for Flex (a.k.a Flex Viewer). Lear ## Instructions (Getting Started) -See http://links.esri.com/flexviewer-gettingstarted-developers for more details. - -1. In Adobe Flash Builder 4.6, go to "File" -> "Import Flash Builder project..." -2. Keeping "File" option selected, click "Browse..." button. -3. Select flexviewer-3.1-src.zip downloaded in step 1, e.g. "C:\Documents and Settings\jack\My Documents\flexviewer-3.1-src.zip". -4. "Extract new project to:" textbox will be automatically set to location where the project source will reside, e.g. "C:\Documents and Settings\jack\Adobe Flash Builder 4.6\FlexViewer. -5. Click "Finish" button. Project will be created and displayed in the Package Explorer window of Adobe Flash Builder, e.g. in this case FlexViewer. -6. If prompted to upgrade the project (because it was created with a previous version of Flash Builder), click "OK" -7. If prompted to choose Flex SDK version, select "Flex 4.6.0" or higher -8. If needed, download API Library from http://links.esri.com/flex-api/latest-download. -9. Go to "Project" -> "Properties" -> "Flex Build Path". -10. Click "Add SWC" and navigate to the agslib-3.[*]-[YYYY-MM-DD].swc file. +There are three different ways of getting the source code from the GitHub web site: clone, [fork] (https://help.github.com/articles/fork-a-repo) and download zip. See http://links.esri.com/flexviewer-gettingstarted-developers for more details. + +Once you have the source code on your own machine, you need to import it into Adobe Flash Builder. + +1. In Adobe Flash Builder 4.6 or 4.7, go to "File" -> "Import Flash Builder project...", then depending on whether you have a zip file or not, follow step 2 or 3. +2. If you downloaded the zip file: + 1. Keep "File" option selected, click "Browse..." button. Select the downloaded flexviewer-3.[*]-src.zip file, for example "C:\Documents and Settings\jack\My Documents\flexviewer-3.[*]-src.zip". + 2. "Extract new project to:" textbox will be automatically set to location where the project source will reside, e.g. "C:\Documents and Settings\jack\Adobe Flash Builder 4.7\FlexViewer. +3. If you cloned and/or forked the repo: + 1. Select "Project folder", click "Browse..." button and navigate to your local repo, for example C:\Users\jack\Documents\GitHub\arcgis-viewer-flex. +4. Click "Finish" button. Project will be created and displayed in the Package Explorer window of Adobe Flash Builder, e.g. in this case FlexViewer. +5. If prompted to upgrade the project (because it was created with a previous version of Flash Builder), click "OK" +6. If prompted to choose Flex SDK version, select "Flex 4.6.0" or higher. +7. Download API Library from http://links.esri.com/flex-api/latest-download. Unzip it. +8. Go to "Project" -> "Properties" -> "Flex Build Path". +9. Click "Add SWC" and navigate to the agslib-3.[*]-[YYYY-MM-DD].swc API library file. Optionally: