How to use JavaScript for GPS and mapping applications?