POST
|
Also curious why an "Arial" label renders fine in the browser, but is rendering as "Verdana" in the PDF. We're running ArcGIS on an Ubuntu server with Arial installed. Is there a setting in ArcGIS for fonts it's able to use?
... View more
04-19-2013
09:15 AM
|
0
|
0
|
170
|
POST
|
When will the API support strokes/outlines/halos on esri.symbol.TextSymbol? It seems like a very high value feature for cartography, and TextSymbols output to an svg "text fill" element anyway, which supports strokes on text. I ask because while it's not been a big deal to implement a solution for that locally within the browser, esri.tasks.PrintTask nor the server have any concept of a stroke. And as it's been mentioned a few times already on these forums, the PDF returned also fails to honor Align, Offset, and in my own testing, Angle properties set on the TextSymbol (it rotates in the opposite direction in the PDF). When will PrintTask support Base64 encoded URIs within esri.symbol.PictureMarkerSymbol? I see in the 3.4 release notes here that PictureMarkerSymbol now supports Base64 URIs, but I've already been using them that way since 3.2 at least, using HTML5 canvas as a workaround for TextSymbol not supporting stroke. However, when I send these PictureMarkerSymbols to print task, the PDF scales the image up, seemingly in direct relation to it's width to height ratio: [ATTACH=CONFIG]23225[/ATTACH] This isn't an issue at all when the URL provided for the PictureMarkerSymbol is a remotely hosted image file.
... View more
04-04-2013
03:21 PM
|
0
|
1
|
856
|
POST
|
Experiencing the same issue. Using the Print Widget sample, I added the following code to init: dojo.connect(app.map, "onClick", function(evt){
app.map.graphics.add(new LabelGraphic("This is broken.", evt.mapPoint));
})
and added this function: LabelGraphic = function(text, point, data){
data = data || {};
return new esri.Graphic(
new esri.geometry.Point(
point.x,
point.y,
map.spatialReference
),
new esri.symbol.TextSymbol(
text,
new esri.symbol.Font(
14,
data.option == "italic" ? esri.symbol.Font.STYLE_ITALIC : esri.symbol.Font.STYLE_NORMAL,
esri.symbol.Font.VARIANT_NORMAL,
data.option == "bold" ? esri.symbol.Font.WEIGHT_BOLD : esri.symbol.Font.WEIGHT_NORMAL,
"Arial"
),
data.fillColor ? new dojo.Color(data.fillColor) : new dojo.Color("#F00")
)
);
} Clicking the map correctly adds the TextSymbol to the graphics layer, but it doesn't show in the printed map.
... View more
01-07-2013
12:51 PM
|
0
|
0
|
981
|
POST
|
Is there a better place to report (alleged) bugs for the JSAPI?
... View more
12-06-2012
01:53 PM
|
0
|
0
|
139
|
POST
|
http://help.arcgis.com/en/webapi/javascript/arcgis/samples/ed_toolbar/index.html 1) Double click the polygon 2) Drag a vertex 3) Pan or zoom the map
... View more
11-27-2012
01:53 PM
|
0
|
1
|
486
|
POST
|
Bump, I'm noticing this behavior as well. It always initializes (OnStatusChangedListener.STATUS.INITIALIZED), and then sometimes renders, sometimes doesn't render, until I pan / zoom / rotate. Also, I've not been able to ever get a dynamic or tiled layer to give a LAYER_LOADED status (even though I see it load). Am I misunderstanding what LAYER_LOADED means?
... View more
02-03-2012
08:51 AM
|
0
|
0
|
292
|
POST
|
After viewing some other sample apps in the SDK, addView is no good, rather add the map via XML: <com.esri.android.map.MapView
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</com.esri.android.map.MapView>
and reference it in your Java: mapView = (MapView)findViewById(R.id.map);
... View more
01-23-2012
01:45 PM
|
0
|
0
|
857
|
POST
|
When I create a mapView as per the API docs and setContentView(mapView), everything works as expected. However, I need to show a header and footer as well, so I've set up a layout in my main.xml like this: <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- HEADER -->
<include android:id="@+id/top_header"
android:layout_alignParentTop="true" layout="@layout/window_title" />
<!-- FOOTER -->
<LinearLayout android:id="@+id/bottom_menu"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:background="#333333"
android:gravity="center_horizontal">
<!-- menu bar -->
<Button
android:id="@+id/btn_edit_feature"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/btn_edit_feature"
android:onClick="chooseFeatureLayer" />
<!-- <include layout="@layout/layout_footer_menu" /> -->
</LinearLayout>
<!-- MAIN PART -->
<LinearLayout android:id="@+id/map_container"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/top_header"
android:layout_above="@id/bottom_menu"
android:layout_weight="1"
android:padding="5dp"
android:background="#550000">
</LinearLayout>
</RelativeLayout> and then I try to show the mapView in "map_container" with this: mapView = new MapView(this);
mapContainer = (LinearLayout) findViewById(R.id.map_container);
mapContainer.addView(mapView);
setContentView(R.layout.main); It show's the red background of the LinearLayout (5dp of padding), but the map area is black, and mapView.isLoaded() returns false on a button press. Is there something built into MapView that means it will only initialize if it's displayed via setContentView?
... View more
01-23-2012
09:44 AM
|
0
|
3
|
7084
|
POST
|
Seems like the layerInfos object is missing a lot of useful data. I'm building a custom legend/toc but I can't see how in esri.dijit.Legend it actually gets the symbology to render. I know this is probably stupidly easy, but I've already searched for 2 hours to no avail 😞
... View more
10-26-2011
02:45 PM
|
0
|
0
|
420
|
POST
|
Hi I'm new to Flex / ArcGIS this past month, my experience has been mostly with Actionscript 3 and Flash. I'm trying to modify the viewer so that the widgets themselves open as items within an accordion rather than the default widget container. I've got an accordion built, and using the code in the HeaderController was able to populate each accordion header with the labels that end up in the configData (from config.xml), and when you click the accordion header is triggers the widget to run within the default WidgetContainer (just like the widget menu in the HeaderController), but I am really chasing my tail trying to get the actual widgets to load as content beneath their respective headers. My goal is for this solution to involve as little tweaking to the stock 2.4.1 app as possible, namely, only having to add my own widgets, and change the index.mxml / config.xml / default.css. I'd rather not get into hacking up WidgetManager.mxml / WidgetContainer.mxml if I don't have to. Is there a way to take advantage of all tracking and such that WidgetManager does (open/closed/loaded/ready/etc) and yet have the widgets render as accordion items? The best idea I can come up with right now seems to be to let them load within the widgetcontainer, then "steal" them out of it and add them into the accordion. My messy preliminary code below. Does any of this make sense? 😛 <?xml version="1.0" encoding="utf-8"?>
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:viewer="com.esri.viewer.*"
xmlns:WidgetAccordion="widgets.GISDirectUI.WidgetAccordion.*"
xmlns:widgetContainer="widgets.WidgetContainer.*"
height="100%"
borderSkin="{null}"
creationComplete="creationCompleteHandler(event)"
widgetConfigLoaded="init()">
<fx:Script>
<![CDATA[
import com.esri.viewer.ViewerContainer;
import com.esri.viewer.AppEvent;
import com.esri.viewer.IBaseWidget;
import com.esri.viewer.WidgetStates;
import com.esri.viewer.IWidgetContainer;
import mx.core.IVisualElement;
import mx.events.FlexEvent;
import mx.collections.ArrayCollection;
import mx.controls.Button;
import mx.effects.easing.*;
[Bindable]
private var widgetItemAC:ArrayCollection;
[Bindable]
private var groupWidgetAC:ArrayCollection;
private function creationCompleteHandler(event:FlexEvent):void
{
if (configData)
{
widgetItemAC = getWidgetItems(configData.widgets);
var curHeader:Button;
for (var i:int = 0; i < widgetBox.numChildren; i++)
{
curHeader = Button(widgetBox.getHeaderAt(i));
curHeader.addEventListener(MouseEvent.CLICK, accordionItemClick);
}
}
}
private function init():void
{
if (configXML)
{
}
}
private function getWidgetItems(widgetList:Array):ArrayCollection
{
var menuItems:ArrayCollection = new ArrayCollection;
var widgetItem:WidgetItem;
for (var i:int = 0; i < widgetList.length; )
{
if (widgetList.grouped)
{
// grouped
var widgetArray:Array = [];
var length:Number = widgetList.groupLength;
for (var k:int = 0; k < length; k++)
{
widgetArray.push({ widget: widgetList[i + k], open: (widgetList.preload && (widgetList.preload == "open" || widgetList.preload == "minimized")) ? true : false });
}
widgetItem = new WidgetItem;
widgetItem.isGroup = true;
widgetItem.label = widgetList.groupLabel;
widgetItem.icon = widgetList.groupIcon;
widgetItem.widgets = widgetArray;
menuItems.addItem(widgetItem);
// move to the next group
i = i + length;
}
else
{
// upgrouped
widgetItem = new WidgetItem;
widgetItem.id = widgetList.id;
widgetItem.label = widgetList.label;
widgetItem.icon = widgetList.icon;
widgetItem.url = widgetList.url;
widgetItem.open = widgetList.preload && (widgetList.preload == "open" || widgetList.preload == "minimized");
menuItems.addItem(widgetItem);
// move to the next individual widget
i++;
}
}
return menuItems;
}
private function accordionItemClick(event:Event):void
{
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, event.target.parent.selectedIndex));
//event.target.parent.getHeaderAt(event.target.parent.selectedIndex).addChild(configData.widgetContainers[0].widgets[event.target.parent.selectedIndex]);
//event.target.parent.getHeaderAt(event.target.parent.selectedIndex).addElement(configData.widgetContainers[0].widgets[event.target.parent.selectedIndex]);
trace(configData.widgetContainers[0].widgets[event.target.parent.selectedIndex].label);
}
]]>
</fx:Script>
<s:BorderContainer id="rightPanel"
width="300" height="100%"
backgroundAlpha=".95"
backgroundColor="0x2c2c2c">
<mx:Accordion id="widgetBox" width="100%" height="300" openDuration="125" openEasingFunction="{Linear.easeOut}">
<mx:Repeater id="widgets" dataProvider="{widgetItemAC}">
<mx:VBox id="wrapper" width="100%" height="100%" label="{widgets.currentItem.label}">
<!-- <s:Label id="theurl" text="{widgets.currentItem.url}"/> -->
</mx:VBox>
</mx:Repeater>
</mx:Accordion>
</s:BorderContainer>
</viewer:BaseWidget>
... View more
08-19-2011
03:04 PM
|
0
|
1
|
461
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|