background preloader

Other

Facebook Twitter

Geolocation API and Client-Side Maps Frameworks - Gil Fink on .Net. May 2, 2011 During the wrap up of the HTML5 course that I’m currently co-authoring, I’ve created two examples of using Geolocation API with Google Maps and with Bing Maps (I didn’t want to deprive any of them ). This post won’t introduce the frameworks or the APIs.

On the other hand try to find the differences of doing almost the same thing in both of the client-side maps frameworks. Google Maps and Geolocation API <title>Geolocation API with Google Maps</title> html height: 100%; body margin: 0px; padding: 0px; $(document).ready(function () { if (Modernizr.geolocation) { navigator.geolocation.getCurrentPosition(function (e) { var location = new google.maps.LatLng(e.coords.latitude, e.coords.longitude); var options = { zoom: 12, center: location, mapTypeId: google.maps.MapTypeId.HYBRID var map = new google.maps.Map($("#mapElement")[0], options); var pin = new google.maps.Marker({ position: location, map: map, title: 'Your Current Location', draggable: true, animation: google.maps.Animation.BOUNCE else { Enjoy!

Gdreflections.com. WireIt - a Javascript Wiring Library. Cloud9 IDE - Ajax.org. Backbone.js. Seminar Registration Form with jQuery. Simple jQuery Dropdowns. Solution for Long Dropdowns. Building a scaleable GoogleMaps-like picture viewer in one hour or less. | Todd Moy. GSV: Pan & Scan. The IDL Astronomy User's Library. CivicMaps Tile Engine. Open Source. Simplified. YUI Compressor. According to Yahoo! 's Exceptional Performance Team, 40% to 60% of Yahoo! 's users have an empty cache experience and about 20% of all page views are done with an empty cache (see this article by Tenni Theurer on the YUIBlog for more information on browser cache usage).

This fact outlines the importance of keeping web pages as lightweight as possible. Improving the engineering design of a page or a web application usually yields the biggest savings and that should always be a primary strategy. With the right design in place, there are many secondary strategies for improving performance such as minification of the code, HTTP compression, using CSS sprites, etc.

In terms of code minification, the most widely used tools to minify JavaScript code are Douglas Crockford's JSMIN, the Dojo compressor and Dean Edwards' Packer. Documentation: Detailed description of the YUI Compressor and how to use it. How does the YUI Compressor work? Using the YUI Compressor from the command line Additional notes. Amy Editor. Rx: Simple, Extensible Schemata. Amit’s Thoughts on Grids. Grids are commonly used in games for representing playing areas such as maps (in games like Civilization and Warcraft), playing surfaces (in games like pool, table tennis, and poker), playing fields (in games like baseball and football), boards (in games like Chess, Monopoly, and Connect Four), and abstract spaces (in games like Tetris).

I’ve attempted to collect my thoughts on grids here on these pages. I avoid implementation details (such as source code) and instead focus on concepts and algorithms. I’ve mostly used grids to represent maps in strategy and simulation games. Although many of the concepts here are useful for all sorts of grids, there is a bias towards the kinds of games I am interested in. Grids are built from a repetition of simple shapes. I’ll cover squares, hexagons, and triangles; vertices, edges, and faces (tiles); coordinate systems; and algorithms for working with grids. The impatient should skip ahead to coordinate systems. Squares Figure 1: Square Grid Hexagons. Amit’s Game Programming Information. What’s on this page? I’m interested in producing complexity out of simple parts. This page contains bookmarks that I collected while working on games; I did not write most of the content linked from here.

As a result the set of links here reflects the types of things I needed to know: only a few specific topics (not everything related to game programming), general ideas instead of platform-specific information (graphics, sound, compilers), and ideas and designs instead of source code (I find it easier to go from an idea to code than from code to an idea). Other sites, like Gamedev Tuts+, Gamedev, and Gamasutra, cover lots more topics than mine does. Shortest Paths Determining how to move around on a map is an interesting problem. These pages are about specific techniques for pathfinding and object movement: My current favorite algorithm is A*, because it can handle varying terrain costs well, and it seems to be faster than most graph searching algorithms. Code and Demos Game Design Notices. Resize or Scaling -- IM v6 Examples. Index We look at enlarging and reducing images in various ways. The image remains intact and whole, but individual points of color merged or expanded to use up a smaller/larger canvas area.

Note that while this is related to the resolution of an image (number of pixels per real world length), that is more a product of how the image is eventually used, and not a true concern of Direct Image Processing. Resizing Images The most obvious and common way to change the size of an image is to resize or scale an image. The content of the image is then enlarged or more commonly shrunk to fit the desired size. But while the actual image pixels and colors are modified, the content represented by the image is essentially left unchanged.

Resize will do nothing at all if the resized image is the same size. The exception to this (there is always an exception) is if you actually specify a Resampling Filter using a "-filter" setting. Resize will fit the image into the requested size. Distort vs Resize. Map Scripting 101: The Book - Map Scripting. Kodingen - The Cloud Development Environment, Online Code Editor, Cloud Hosting, Web based access to file-system, ftp & svn integration. Online YAML Parser. Firebug. APE, Free AJAX Push Engine / Wiki / Tutorial:How to write an application with APE - Ape Wiki. Sylvester - Vector and Matrix math for JavaScript.

Mapstraction mai list