POST
|
I'm glad to hear that resolved the original issue. It's currently up to the symbol code to support wraparound mode. This may be changed at the 3.0 final release. Any documentation on how to support wraparound mode?
... View more
04-30-2012
12:20 PM
|
0
|
0
|
175
|
POST
|
After adding that code, I didn't need to have "defaultGraphicsLayer.visible = false" There weren't any other effects I can see though. Quick question, it seems that the markers only occur once on the map and don't get copied into areas where the map repeats itself. Is there a setting that needs to be set to support that or some code that needs to be added into the symbol, graphic or graphicsLayer?
... View more
04-28-2012
09:11 AM
|
0
|
0
|
707
|
POST
|
No, I haven't been seeing any problems related to that. I'll try adding that code and will report what happens~
... View more
04-27-2012
05:04 PM
|
0
|
0
|
707
|
POST
|
Sure, here is my Symbol code: package com.flack.geni.display.mapping.mapproviders.esriprovider
{
import com.esri.ags.Graphic;
import com.esri.ags.Map;
import com.esri.ags.geometry.Geometry;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.symbols.MarkerSymbol;
import com.esri.ags.symbols.Symbol;
import com.flack.geni.resources.physical.PhysicalNodeCollection;
import com.flack.geni.resources.sites.GeniManagerCollection;
import com.flack.geni.resources.virtual.VirtualNodeCollection;
import com.flack.shared.utils.ColorUtil;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import mx.core.DragSource;
import mx.core.IUIComponent;
import mx.core.UIComponent;
import mx.managers.DragManager;
public class EsriMapNodeMarkerSymbol extends Symbol
{
private var marker:EsriMapNodeMarker;
public function EsriMapNodeMarkerSymbol(newMarker:EsriMapNodeMarker)
{
super();
marker = newMarker;
}
override public function draw(sprite:Sprite,
geometry:Geometry,
attributes:Object,
map:Map):void
{
if (geometry is MapPoint)
{
var managers:GeniManagerCollection = marker.Nodes.Managers;
var mapPoint:MapPoint = MapPoint(geometry) as MapPoint;
sprite.x = toScreenX(map, mapPoint.x)-14-Math.min(3*((marker.Nodes as PhysicalNodeCollection).Locations.length-1), 6)/2;
sprite.y = toScreenY(map, mapPoint.y)-14-Math.min(3*((marker.Nodes as PhysicalNodeCollection).Locations.length-1), 6)/2;
var loc:int;
if(managers.length > 1)
{
var numShownManagers:int = Math.min(managers.length, 5);
loc = 3*(numShownManagers-1);
for(var i:int = numShownManagers-1; i > -1; i--)
{
sprite.graphics.lineStyle(2, ColorUtil.colorsMedium[managers.collection.colorIdx], 1);
sprite.graphics.beginFill(ColorUtil.colorsDark[managers.collection.colorIdx], 1);
sprite.graphics.drawRoundRect(loc, loc, 28, 28, 10, 10);
loc -= 3;
}
}
else
{
if(marker.Nodes is PhysicalNodeCollection)
loc = Math.min(3*((marker.Nodes as PhysicalNodeCollection).Locations.length-1), 6);
else if(marker.Nodes is VirtualNodeCollection)
loc = Math.min(3*((marker.Nodes as VirtualNodeCollection).PhysicalNodes.Locations.length-1), 6);
while(loc > -1)
{
sprite.graphics.lineStyle(2, ColorUtil.colorsMedium[managers.collection[0].colorIdx], 1);
sprite.graphics.beginFill(ColorUtil.colorsDark[managers.collection[0].colorIdx], 1);
sprite.graphics.drawRoundRect(loc, loc, 28, 28, 10, 10);
loc -= 3;
}
}
var labelMc:TextField = new TextField();
labelMc.textColor = ColorUtil.colorsLight[managers.collection[0].colorIdx];
labelMc.selectable = false;
labelMc.border = false;
labelMc.embedFonts = false;
labelMc.mouseEnabled = false;
labelMc.width = 28;
labelMc.height = 28;
labelMc.htmlText = marker.Nodes.length.toString();
labelMc.autoSize = TextFieldAutoSize.CENTER;
labelMc.y = 4;
sprite.addChild(labelMc);
// Apply the drop shadow filter to the box.
var shadow:DropShadowFilter = new DropShadowFilter();
shadow.distance = 5;
shadow.angle = 25;
sprite.filters = [shadow];
sprite.buttonMode = true;
sprite.useHandCursor = true;
}
}
}
}
... View more
04-26-2012
11:25 AM
|
0
|
0
|
707
|
POST
|
There currently isn't an easier way to disable the highlight feature, but it would be good to know why it wasn't working for you. Are you also using a custom Graphic or GraphicsLayer? Yes, I created a Graphic which has a custom Symbol set on it and add it to a GraphicsLayer
... View more
04-25-2012
05:05 PM
|
0
|
0
|
707
|
POST
|
Thanks, that fixed it! If there is a more appropriate way for me to handle that please let me know~
... View more
04-25-2012
11:14 AM
|
0
|
0
|
707
|
POST
|
(EDIT: FYI using 3.0 preview) I am using a custom Symbol in a GraphicsLayer with a infoWindowRenderer defined which does nothing but display some static stuff (from the InfoWindow sample) but I'm seeing some strange results. When I click on a symbol, it looks like either the first symbol in the GraphicsLayer or perhaps all of the symbols are getting re-drawn under where the infoWindow appears. Here is a picture before and after clicking on a symbol: [ATTACH=CONFIG]13790[/ATTACH] [ATTACH=CONFIG]13791[/ATTACH] When I click the 'x' on the infoWindow, the extra added symbol(s) goes away. Here is what my graphicsLayer definition looks like: <esri:GraphicsLayer id="markersLayer" infoWindowRenderer="com.flack.geni.display.mapping.mapproviders.esriprovider.testInfoWindow" /> I'm not doing much with the infoWindowRenderer, here's the code for that: <?xml version="1.0" encoding="utf-8"?> <esri:LabelDataRenderer 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:esri="http://www.esri.com/2008/ags"> <esri:label>test</esri:label> <s:BorderContainer backgroundColor="white" borderColor="black" color="green" cornerRadius="5" minHeight="0" minWidth="0"> <s:layout> <s:VerticalLayout paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"/> </s:layout> <s:Label text="Sex ratio"/> <s:Label text="Divorce rate:" toolTip="Divorce rate is the number of divorces per 1000 people."/> </s:BorderContainer> </esri:LabelDataRenderer> Any insight would be greatly appreciated 🙂
... View more
04-24-2012
06:45 PM
|
0
|
12
|
2745
|
POST
|
I have custom symbols I'm adding to a feature layer. This there a recommended method to support dragging and dropping the symbols into a flex object outside of the map?
... View more
03-02-2012
12:30 AM
|
0
|
0
|
605
|
POST
|
Thanks for the help, that looks like what I need. I wanted to extend the symbol class but couldn't find any documentation on how to do it so perhaps this might be something to add to the examples 🙂
... View more
02-10-2012
08:38 AM
|
0
|
0
|
370
|
POST
|
Without being able to create an instance I'm not sure it's useful to me. I generate a lot of different symbols which have numbers, colors, etc. based on various values. I'm coming from the Google Maps API for Flash which had this ability so I'm trying to find something which can do something similar.
... View more
02-09-2012
06:34 PM
|
0
|
0
|
370
|
POST
|
No, I'm looking to add a UIComponent to the map. EDIT: Or even just a sprite Swatches do look very useful though, thanks for pointing me to that.
... View more
02-07-2012
10:41 AM
|
0
|
0
|
370
|
POST
|
I would like to have a marker that is just a sprite or a flex component. InfoSymbol looks promising but I don't want a bubble around my component. Is there any support for this?
... View more
02-02-2012
10:28 AM
|
0
|
6
|
3382
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|