Skip to content

Instantly share code, notes, and snippets.

View onderaltintas's full-sized avatar
🏠
Working@home

Önder onderaltintas

🏠
Working@home
View GitHub Profile
--This program is free software: you can redistribute it and/or modify
--it under the terms of the GNU General Public License as published by
--the Free Software Foundation, either version 3 of the License, or
--(at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU General Public License for more details.
@onderaltintas
onderaltintas / gist:7579645
Created November 21, 2013 10:50
Javascript class structure -1 Public & Private method&attribute
/*
The MIT License (MIT)
Copyright (c) 2013 Önder ALTINTAŞ
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@onderaltintas
onderaltintas / degrees2meters.js
Last active April 12, 2022 01:38 — forked from springmeyer/degress2meters.js
javascript coordinate conversions between 900913(3857) - 4326(lat lon)
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
}
//test
lon= -77.035974
lat = 38.898717