Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var lonC=lon1/2+lon2/2;
- var latC=lat1/2+lat2/2;
- var scaleX=(screenWidth-leftOffset-rightOffset)*(lon2-lon1);//Pixels in meter x
- var scaleY=(screenHeight-topOffset-bottomOffset)*(lat2-lat1);//Pixels in meter y
- var scale;//Scale equals minimal scale between scaleX and scaleY
- if(scaleX<scaleY)
- scale=scaleX;
- else scale=scaleY;
Add Comment
Please, Sign In to add comment