[From nobody Wed Jun 15 08:36:53 2005 X-Account-Key: account2 Return-Path: <ka-map-users-bounces@lists.maptools.org> Received: from xcalibur.dmsolutions.ca (gw.dmsolutions.ca [209.217.116.146]) by in3.magma.ca (Magma's Mail Server) with ESMTP id j5FC8RVL024194; Wed, 15 Jun 2005 08:08:28 -0400 Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged)) by xcalibur.dmsolutions.ca (8.13.4/8.13.4) with ESMTP id j5FC8Rd6020855; Wed, 15 Jun 2005 08:08:27 -0400 Received: from duke.maptools.org (duke.maptools.org [127.0.0.1]) by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j5FCCk9G025158; Wed, 15 Jun 2005 08:12:46 -0400 Received: from mx1.magmacom.com (mx1.magmacom.com [206.191.0.217]) by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j5FBR7U8024385 for <ka-map-users@lists.maptools.org>; Wed, 15 Jun 2005 07:27:07 -0400 Received: from www-webmail2.magma.ca (www-webmail2.magma.ca [206.191.0.227]) by mx1.magmacom.com (8.13.0/8.13.0) with ESMTP id j5FBMg7N024854; Wed, 15 Jun 2005 07:22:43 -0400 Received: (from pagameba@localhost) by www-webmail2.magma.ca (8.13.1/8.13.1/Submit) id j5FBMfWP009630; Wed, 15 Jun 2005 07:22:41 -0400 Date: Wed, 15 Jun 2005 07:22:41 -0400 Message-Id: <200506151122.j5FBMfWP009630@www-webmail2.magma.ca> X-Authentication-Warning: www-webmail2.magma.ca: pagameba set sender to pagameba@magma.ca using -f To: Nakayama Kotaro <cot@d2.dion.ne.jp>, ka-map-users@lists.maptools.org From: "Paul Spencer" <pagameba@magma.ca> Subject: Re: [ka-Map-users] longitude and latitude X-Account: pagameba X-Sender-IP: 206.191.1.43 X-INFO: Folder - (nil), Message - (nil), MimeBody - (nil) Mime-Version: 1.0 Content-Type: text/plain X-Mailman-Approved-At: Wed, 15 Jun 2005 08:11:47 -0400 Cc: X-BeenThere: ka-map-users@lists.maptools.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "ka-Map mailing list." <ka-map-users.lists.maptools.org> List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/ka-map-users>, <mailto:ka-map-users-request@lists.maptools.org?subject=unsubscribe> List-Archive: <http://lists.maptools.org/pipermail/ka-map-users> List-Post: <mailto:ka-map-users@lists.maptools.org> List-Help: <mailto:ka-map-users-request@lists.maptools.org?subject=help> List-Subscribe: <http://lists.maptools.org/mailman/listinfo/ka-map-users>, <mailto:ka-map-users-request@lists.maptools.org?subject=subscribe> Sender: ka-map-users-bounces@lists.maptools.org Errors-To: ka-map-users-bounces@lists.maptools.org X-Spam-Status: No, score=0.0 Hi, in the head CVS version, there are now some functions to help do this: kaMap.getGeoExtents() kaMap.pixToGeo() kaMap.geoToPix() In general, the logic is: lon = (parseInt(theInsideLayer.style.left) + xOrigin) * cellSize lat = (parseInt(theInsideLayer.style.lat) + yOrigin) * cellSize (or it might be - xOrigin/yOrigin ... haven't looked at the code) except that you will only get lon/lat if you are using a geographic projection with UNITS DD in your map file. Otherwise, you will get coordinates in whatever your projection is. MapBuilder has a javascript implementation of the PROJ library (or at least parts of it) that could be used in ka-Map to reproject from certain projections like LCC into a lon/lat projection (like EPSG:4326) HTH Paul On Jun 15, Nakayama Kotaro <cot@d2.dion.ne.jp> wrote: > > Hi all. > > I have a simple question. > How to get current longitude and latitude from ka-map? > I guess it relates to variables such as nCurrentLeft, nCurrentTop, > xOrigin, yOrigin in JavaScript... But I couldn't understand what means that. > I saw this question (Derek Munro: "Caching timeout explanation") in the > archive but I couldn't find the answer. > > Thanks > > ---------- > Kotaro Nakayama > _______________________________________________ > ka-Map-users mailing list > ka-Map-users@lists.maptools.org > <a href='http://lists.maptools.org/mailman/listinfo/ka-map- users'>http://lists.maptools.org/mailman/listinfo/ka-map-users</a> > _______________________________________________ ka-Map-users mailing list ka-Map-users@lists.maptools.org http://lists.maptools.org/mailman/listinfo/ka-map-users ]