POST
|
Hello~ My MapView show this :"Licensed for Developer use only" How can I dismiss these words. Thanks.
... View more
07-01-2014
05:30 PM
|
0
|
1
|
1762
|
POST
|
Thanks God. I found the answer there: http://forums.arcgis.com/threads/103682-Graphic-class-explanation-required?highlight=GraphicLayer Well, so bad news~
... View more
06-03-2014
12:40 AM
|
0
|
0
|
230
|
POST
|
### I create a custom circle graphic : [PHP] public class CircleGraphic extends Graphic { private CircleGraphic(Geometry geometry, Symbol symbol) { super(geometry, symbol); } public static CircleGraphic getInstance(Point center, int size, int color) { Geometry geometry = getCircleGeometry(center, size); SimpleLineSymbol symbol = new SimpleLineSymbol(color, 3, SimpleLineSymbol.STYLE.SOLID); return new CircleGraphic(geometry, symbol); } public static Geometry getCircleGeometry(Point center, int size) { ...... } } [/PHP] ### Then I add this CircleGraphic to GraphicsLayer: [PHP] CircleGraphic circle = CircleGraphic.getInstance(point, size, color); GraphicsLayer.addGraphic(circle); [/PHP] ### But I can't get the CircleGraphic from the GraphicsLayer again: [PHP] int[] ids = GraphicsLayer.getGraphicIDs(); for (int i = 0; i < ids.length; i++) { int id = ids; Graphic g = getGraphic(id); if (g instanceof CircleGraphic) { ...... // can't reach here!! Why?? It should be a CircleGraphic!! } CircleGraphic circle = (CircleGraphic)getGraphic(id); //raise type casting error... Why?? } [/PHP] Thanks for your help .
... View more
06-01-2014
11:01 PM
|
0
|
2
|
1209
|
POST
|
Finally, I got the relationship between these values: offset * cos(latitude) = real distance 1000 * cos(DEGREES_TO_RADIANS(39.082718274606)) = 776.236 Yeah~
... View more
10-11-2013
04:19 PM
|
0
|
0
|
291
|
POST
|
In addition. Create two points by offsetY: 1000 [PHP] AGSPoint *p1 = [AGSPoint pointWithX:webMercatorX y:webMercatorY spatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS_1984_WEB_MERCATOR_AUXILIARY_SPHERE]]; AGSMutablePoint *p2 = [AGSMutablePoint pointWithX:p1.x y:p1.y spatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS_1984_WEB_MERCATOR_AUXILIARY_SPHERE]]; [p2 offsetByX:0 y:1000]; [/PHP] Then calculate the distance between p1 and p2: [PHP] float len1 = [p1 distanceToPoint:p2]; AGSMutablePolyline *line = [[AGSMutablePolyline alloc] initWithSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS_1984_WEB_MERCATOR_AUXILIARY_SPHERE]]; [line addPathToPolyline]; [line addPointToPath:p1]; [line addPointToPath:p2]; AGSGeometryEngine *engine = [AGSGeometryEngine defaultGeometryEngine]; float len2 = [engine lengthOfGeometry:line]; float len3 = [engine geodesicLengthOfGeometry:line inUnit:AGSSRUnitMeter]; float len4 = [engine shapePreservingLengthOfGeometry:line inUnit:AGSSRUnitMeter]; [/PHP] The result is: len1 = len2 = 1000 meters len3 = len4 = 776.44727 meters In fact, the real result should be 776.44727 (I measured it in the outdoors, the latitude of my GPS position is 39.082718274606). So why offsetY:1000 results 776.44727 ? And how can I get the real 1000 meters offset.
... View more
10-11-2013
04:45 AM
|
0
|
0
|
291
|
POST
|
[AGSMutablePoint offsetByX:xOffset y:yOffset] The SDK says: xOffset : The offset along x coordinate. yOffset : The offset along y coordinate. What does offset mean exactlly. Does it mean the International Meter Unit. Now I want to add 1000 meters in y coordinate. Here is my code, is it correct: [PHP] AGSMutablePoint *point = [AGSMutablePoint pointWithX:webMercatorX y:webMercatorY spatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS_1984_WEB_MERCATOR_AUXILIARY_SPHERE]]; //Web Mercator [point offsetByX:0 y:1000]; //add 1000 meters in y coordinate [/PHP] Thank you.
... View more
10-11-2013
12:31 AM
|
0
|
2
|
1061
|
POST
|
http://www.mathsisfun.com/algebra/trig-finding-angle-right-triangle.html Get the change in x and y for the 2 points, and use trigonometry to calculate the angle. You may have to offset the angle to account for North being 0. Thanks. This is a way to do. But higher latitude value may cause some error.
... View more
10-11-2013
12:05 AM
|
0
|
0
|
435
|
POST
|
Can you explain your problem a little in detail? I am not sure if I understood the meaning of calculating the direction of two points. A point does not have a direction associated with it. It is just a point. Well, sorry for my poor English. I mean that: Connecting two AGSPoint will make a straight line. Then the line will make a direction to the North of the Earth. (Just like the dirction of the compass)
... View more
10-11-2013
12:00 AM
|
0
|
0
|
435
|
POST
|
I want to calculate the high precision direction of the two point ??The direction is calculated from the north of the earth.??. How can I do it by the SDK. Thanks very much.
... View more
10-05-2013
09:25 AM
|
0
|
4
|
743
|
POST
|
I mean my map may show 500 AGSGraphics??e.g: A triangle??.And these 500 triangle are totally the same but with different directions. So there should be an easy way to render these graphics with greate performance. How can I do this? Thanks!
... View more
06-21-2013
12:17 AM
|
0
|
0
|
538
|
POST
|
Are you using Update 1 for the 10.1.1 release? We improved memory management in that update. Please download it and let us know how it works out. Thanks! I'll try it out ..
... View more
06-20-2013
05:53 PM
|
0
|
0
|
408
|
POST
|
I create 10 AGSGraphicsLayers and add to the MapView. It works well in SDK 2.3.2 on the iPad. Today I upgrade the SDK to 10.1.1. It occupied nearly 600MB when I create 10 AGSGraphicsLayers on App starting. Then it crashed because it received high memory warning. How to solve my problem? How to optimize the 10 layers? Addition, my app has ARC(auto-reference-couting) on. Thank you!
... View more
06-09-2013
08:25 PM
|
0
|
8
|
744
|
POST
|
I create 10 AGSGraphicsLayers on my pad App. It works well in SDK 2.3.2. Today I upgrade the SDK to 10.1.1. It occupied nearly 600MB when I create the 10 AGSGraphicsLayers on App starting. Then it crashed because it received high memory warning. How to solve my problem? Merge the 10 AGSGraphicsLayers into 1? Addition, my app has ARC(auto-reference-couting) on. Thank you!
... View more
06-09-2013
08:02 AM
|
0
|
0
|
606
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|