Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4217718096 for ; Wed, 13 Jan 2016 07:40:35 +0000 (UTC) Received: (qmail 9268 invoked by uid 500); 13 Jan 2016 07:40:34 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 9241 invoked by uid 500); 13 Jan 2016 07:40:34 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 9229 invoked by uid 99); 13 Jan 2016 07:40:34 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2016 07:40:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 31B39C1568 for ; Wed, 13 Jan 2016 07:40:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.463 X-Spam-Level: **** X-Spam-Status: No, score=4.463 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id RJAUjI5lML4H for ; Wed, 13 Jan 2016 07:40:26 +0000 (UTC) Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 1668443BFE for ; Wed, 13 Jan 2016 07:40:26 +0000 (UTC) Received: by mail-vk0-f41.google.com with SMTP id k1so256867427vkb.2 for ; Tue, 12 Jan 2016 23:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=bsaaIn0sWo3LT8DiEkDRA833NxamfuIZFen9OfTRK5Q=; b=DeXAxsn3hUQk+DbzSm3kJZldUouVrs463X+F+BP/HLKDoiUDg4qiDKiFMWlDLAFPOQ h41ZXHXXGja17Lly0iJU285sB3MMM1is5LwPc7enMhufo+s7oeYSBP1rOZfTouE77yRs Z/9yM7qt1DK5MQFND7chB0smriZ0G38Q2FOUc7SPwuSm6elHS6aEas4YQT1QcoWkXVE3 pc2EUrVnje4NG2UkwNBY0nhY+UPPWneVela0p/tLQL3CT5vNL3RnWo+lGjB+Ku+nIa2Q PApn8c5TxJHxx1sdGtGBzvYQdY0+U9TsL1UoU4cifTCc92d4FbqTtqmt9KUwbqyVPscT pnBQ== X-Received: by 10.31.10.199 with SMTP id 190mr97237777vkk.51.1452670819324; Tue, 12 Jan 2016 23:40:19 -0800 (PST) MIME-Version: 1.0 Sender: omuppi1@gmail.com Received: by 10.31.224.129 with HTTP; Tue, 12 Jan 2016 23:39:49 -0800 (PST) In-Reply-To: References: From: OmPrakash Muppirala Date: Tue, 12 Jan 2016 23:39:49 -0800 X-Google-Sender-Auth: 9TYxvh0lGroemRg9AiDLjmTNtdQ Message-ID: Subject: Re: [Flex] Map Component To: "dev@flex.apache.org" Content-Type: multipart/alternative; boundary=001a1144017629595705293248a4 --001a1144017629595705293248a4 Content-Type: text/plain; charset=UTF-8 Moving thread to dev@. Users@ in bcc in case someone else is interested in this. The d in the path node is a stringified set of points which are connected by lines. M is for moveTo, L is for lineTo and Z signifies closing the path back to the first point. Each country (or region) has its own shape which is denoted by the d string. The series of path objects is sufficient to draw all the countries using a stroke and a fill. Looking at your coordinates, it looks like a closed polygon. You might want to try to use Mercator projection to project the lat long coordinates to cartesian coordinates. Here is a very straightforward implementation of this in AS3: *https://bitbucket.org/gka/as3-proj/src/ec91cdd098a15ab1e2cbf5bbd3a3221a36507685/net/vis4/map/proj/MercatorProjection.as?at=default&fileviewer=file-view-default * Basically for each lat/long co-ordinate in your 'coordinates' array, call MercatorProjection.project(), which should give you a Point object. Use these series of Points to draw a shape, which represents your State/region. Do let me know if you need any further help Thanks, Om On Jan 12, 2016 10:06 PM, "Deepak MS" wrote: > Moving following conversation to this separate thread. > > > http://apache-flex-development.2333347.n4.nabble.com/FlexJS-US-States-Map-example-pure-AS3-td48006.html > > Hi Om, > I had one question. > I could see the following path in the worldmap.xml file: > d="M25.4,206.4 L25.4,206.4 L25.3,206.4 L25.4,206.4 Z"> > > United States Minor Outlying Islands > 5 > U.S. MOI > Seven seas (open ocean) > East Asia & Pacific > UMI > UM > 28289407 > North America > 0.57 > 0.58 > um > UM > > > > What is the path data in there? > > I would be getting the boundary data in form of geojson which would have > latitude\longitude points. Something like this: > > { "type": "Feature", "properties": { "BrickCode_": "21000", "State": "NSW", > "ML_Code": "ML108" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ > 151.25715360000004, -33.743317043500042 ], [ 151.25985827199997, > -33.743840223500001 ], [ 151.26121619200012, -33.74746011849993 ], [ > 151.269228, -33.74990100849999 ], [ 151.26887100800002, -33.757243991500047 > ], [ 151.27524460799998, -33.756977721 ], [ 151.28052790400011, > -33.75872719199981 ], [ 151.27875936, -33.768415808499981 ], [ > 151.27282256000012, -33.767621917999975 ], [ 151.27024985600008, > -33.77462350199994 ], [ 151.27552054400007, -33.779516363499738 ], [ > 151.27530051200017, -33.781854430499834 ], [ 151.26530544000002, > -33.780174667499921 ], [ 151.26095520000001, -33.777029796999898 ], [ > 151.259648416, -33.779054695999776 ], [ 151.25597475200004, > -33.779087477999894 ], [ 151.25556144000006, -33.783829046499761 ], [ > 151.24337900800003, -33.781951999499825 ], [ 151.23829500800002, > -33.778761008499828 ], [ 151.23245721600017, -33.762912705999895 ], [ > 151.23388588800003, -33.754605225500029 ], [ 151.24911699200015, > -33.756704993999904 ], [ 151.24983971200004, -33.752049450499953 ], [ > 151.24830732800024, -33.751826433000019 ], [ 151.24833936000005, > -33.748172997499921 ], [ 151.25159628799997, -33.74994213399998 ], [ > 151.25054374400008, -33.746457899499944 ], [ 151.25377328000013, > -33.746925597999962 ], [ 151.25369952000005, -33.74283635799992 ], [ > 151.25715360000004, -33.743317043500042 ] ] ] } } > > I'm sure that we cannot use lat\lng points directly in path data. But I > want to know based on what can we convert these data points to path data. > --001a1144017629595705293248a4--