background preloader

Google Maps API Tutorial

Google Maps API Tutorial
Google Maps API Tutorial This tutorial is intended to help you create your own interactive maps using the Google API. Do take a look at the Google documentation. There are two ways to use this tutorial: Read it and try to understand the principles involved. What's New What's New Recent changes to the tutorial. Instant Maps Part 1 Making instant maps with the Google Wizard Part 2 Making instant maps by embedding maps.google.com The Basics More advanced stuff Part 1 Sidebar mouseovers: Changing icons when the mouse hovers over the sidebar Part 2 Opening info windows when the mouse hovers over a marker Part 3 Dual Maps: A pair of maps that match each other's movements. Fun Stuff Car Trip Using the Google directions for an animated drive. Custom Maps Part 1 Adding your own custom map. Third Party Extensions List A list of all third part extensions that I know about. Compatibility APIv2 supports the old v1 documented commands (except openInfoWindowXslt) as well as the new v2 syntax. Javascript Concepts

The Streaming APIs Updated on Mon, 2012-09-24 14:47 Overview The set of streaming APIs offered by Twitter give developers low latency access to Twitter's global stream of Tweet data. A proper implementation of a streaming client will be pushed messages indicating Tweets and other events have occurred, without any of the overhead associated with polling a REST endpoint. Twitter offers several streaming endpoints, each customized to certain use cases. Differences between Streaming and REST Connecting to the streaming API requires keeping a persistent HTTP connection open. An app which connects to the Streaming APIs will not be able to establish a connection in response to a user request, as shown in the above example. The streaming process gets the input Tweets and performs any parsing, filtering, and/or aggregation needed before storing the result to a data store. Public streams →

10 Lugares para poner Adsense en Blogger Con el cambio de lenguaje en las plantillas de Blogger, de html a xml, agregar publicidad directamente en el código se volvió un poco menos intuitivo, además que cualquier error en la sintaxis puede ocasionar que no puedas guardar los cambios en la plantilla. Para ayudarte en esta tarea hemos hecho una lista con 10 de los lugares en tu blog más comunes para poner publicidad, así como la forma de implementarlos y los formatos más adecuados en base a los disponibles en adsense. (Clic en leer más)PUBLICIDAD Sidebar Implementación. Formatos recomendados: 125×125, 120×600 y 160×600 Entre posts Implementación. Formatos recomendados: 468×60, 300×250 y 336×280 Bajo el header Implementación: Transforma el código del anuncio a su equivalente en caracteres html. Formatos recomendados: 728×90 y 728×15Sobre la columna de entradas Transforma el código del anuncio a su equivalente en caracteres html.Busca <div id=’main-wrapper’>Pega el código convertido justo después. Formatos recomendados: 468×68 y 468×15

Maps API Reference - Google Maps API - Google Code Version 2 of the JavaScript API has been turned down Warning: Version 2 of the Google Maps JavaScript API is no longer available. Please follow the guide to migrate your code to version 3 of the Google Maps JavaScript API. As of November 19, 2013, all applications requesting v2 are served a special, wrapped version of the v3 API instead. We expect this wrapped version of the API to work for most simple maps, but we strongly encourage you to migrate to the v3 API immediately. The Google Maps API is now integrated with the Google AJAX API loader, which creates a common namespace for loading and using multiple Google AJAX APIs. For example, the GMap2 object within the Google Maps API can also be defined as google.maps.Map2. Note that this reference documentation refers only to the existing G namespace. Core Class: This is the most important class within the Maps API. Base Classes: Event Classes: Control Classes: Overlay Classes: Service Classes: class GMap2 Constructor Methods Configuration Controls

Geolocation - Google Maps API Geolocation refers to the identification of the geographic location of a user or computing device via a variety of data collection mechanisms. Typically, most geolocation services use network routing addresses or internal GPS devices to determine this location. Note that geolocation is a device-specific API; some browser/devices support it, while others do not (or cannot), so you cannot assume that geolocation is always possible for a web application. Detecting the User's Location Newer browsers are starting to support the W3C Geolocation standard. Some browsers use IP addresses to detect a user's location. The following example attempts to determine the user's location through the W3C navigator.geolocation property. var initialLocation;var siberia = new google.maps.LatLng(60, 105);var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687);var browserSupportFlag = new Boolean(); View example (map-geolocation) Specifying the Sensor Parameter

Maps API Examples - Google Maps API - Google Code Version 2 of the Google Maps JavaScript API is no longer available. This guide is intended to help developers who are already using the Google Maps JavaScript API v2 migrate their code to version 3. Miguel Angel Vilela, Google Enterprise Support TeamNovember, 2012 Quite a lot has changed between v2 and v3 of the Google Maps JavaScript API. As you start working with the new API, you will quickly find that this is not simply an incremental upgrade. Overview Every application will have a slightly different migration process; however, there are some steps that are common to all projects: Get a new key. Changes in Version 3 of the Google Maps JavaScript API Before planning your migration, you should take time to understand the differences between the Google Maps JavaScript API v2 and the Google Maps JavaScript API v3. Some of the changes in the v3 API include: A streamlined core library. Upgrading Your Application Your New Key Allow you to view usage reports in the APIs console. Loading the API

Using PHP/MySQL with Google Maps - Google Maps API Ben Appleton, Google Geo TeamWith contributions from Lary Stucker, Maps API DeveloperApril 2007 This tutorial is intended for developers who are familiar with PHP/MySQL, and want to learn how to use Google Maps with a MySQL database. After completing this tutorial, you will have a Google Map based off a database of places. The map will differentiate between two types of places—restaurants and bars—by giving their markers distinguishing icons. The tutorial is broken up into the following steps: Creating the Table When you create the MySQL table, you want to pay particular attention to the lat and lng attributes. Note: This tutorial uses location data that already have latitude and longitude information needed to plot corresponding markers. If you prefer interacting with your database through the phpMyAdmin interface, here's a screenshot of the table creation. Populating the Table After creating the table, it's time to populate it with data. Outputting XML with PHP <? <? echo $dom->saveXML(); <!

Map Overlays - Google Maps API - Google Code Version 2 of the JavaScript API has been turned down Warning: Version 2 of the Google Maps JavaScript API is no longer available. Please follow the guide to migrate your code to version 3 of the Google Maps JavaScript API. As of November 19, 2013, all applications requesting v2 are served a special, wrapped version of the v3 API instead. Overlays are objects on the map that are tied to latitude/longitude coordinates, so they move when you drag or zoom the map. The Maps API has several types of overlays: Points on the map are displayed using markers, and often display a custom icon. Each overlay implements the GOverlay interface. Markers identify points on the map. Markers are designed to be interactive. Draggable Markers Markers are interactive objects that can be clicked on and dragged to a new location. var map = new GMap2(document.getElementById("map_canvas"));var center = new GLatLng(37.4419, -122.1419);map.setCenter(center, 13); map.addOverlay(marker); Icons Custom Icons

Creating a Store Locator with PHP, MySQL & Google Maps - Google Maps API Google Geo APIs TeamAugust 2009 This tutorial is intended for developers who are familiar with PHP/MySQL, and want to learn how to use Google Maps with a MySQL database to create a store locator-type app. After completing this tutorial, you will have a database of locations and a webpage that lets a user enter their address and see markers on a map for the locations nearest to them, within a chosen distance restriction. Since the Google Maps JavaScript API is designed to work well on modern mobile browsers, this article will show how to create a website that displays nicely on them. The tutorial is broken up into the following steps: Creating the Table When you create the MySQL table, you want to pay particular attention to the lat and lng attributes. Note: This tutorial uses location data that already have latitude and longitude information needed to plot corresponding markers. Populating the Table After creating the table, it's time to populate it with data. Finding Locations with MySQL <?

Events - Google Maps API - Google Code Warning: Version 2 of the Google Maps JavaScript API is no longer available. Please follow the guide to migrate your code to version 3 of the Google Maps JavaScript API. As of November 19, 2013, all applications requesting v2 are served a special, wrapped version of the v3 API instead. We expect this wrapped version of the API to work for most simple maps, but we strongly encourage you to migrate to the v3 API immediately. JavaScript within the browser is event driven, meaning that JavaScript responds to interactions by generating events, and expects a program to listen to interesting events. The Google Maps API adds to this event model by defining custom events for Maps API objects. Events in the Google Maps API are handled by using utility functions within the GEvent namespace to register event listeners. For a complete list of GMap2 events and the arguments they generate, see GMap2.Events. To register for notification of these events, use the static method GEvent.addListener().

From Info Windows to a Database: Saving User-Added Form Data - Google Maps API Abdulla Kamar, Google Maps API Team June 2009 Objective Many developers use the Google Maps API to create mashups that enable users to add and annotate geographically located information. The most intuitive user interface for accomplishing that goal is to have the user first create a marker or poly, pop up a window with a form, then let the user fill out the form and press a 'save' button to close the info window. This is the method used, for instance, by Google's My Maps service. This tutorial will explain the concepts behind the HTML and JavaScript that make up the info-window editing user interface, as well as the PHP code that can be used to add the saved info window data into a MySQL database. This article is broken up into the following steps: Creating the Table When you create the MySQL table, you want to pay particular attention to the lat and lng attributes. If you prefer interacting with your database through the phpMyAdmin interface, here's a screenshot of the table creation. <?

Map Basics - Google Maps API - Google Code Version 2 of the JavaScript API has been turned down Warning: Version 2 of the Google Maps JavaScript API is no longer available. Please follow the guide to migrate your code to version 3 of the Google Maps JavaScript API. As of November 19, 2013, all applications requesting v2 are served a special, wrapped version of the v3 API instead. We expect this wrapped version of the API to work for most simple maps, but we strongly encourage you to migrate to the v3 API immediately. The fundamental element in any Google Maps API application is the "map" itself. Note: The information in this section pertains to the Google Maps JavaScript API Version 2, which is no longer available for new applications. All Maps API applications should load the Maps API using an API key. To find your existing API key, visit the APIs Console at and log in with your Google Account. By default a key can be used on any site. These steps are explained below. Map DOM Elements var map;

php - Send current gps coordinates to mySQL database using google maps api Embedding chat widgets within EBSCO databases A couple of years ago the U of Calgary was among the first to embed an IM chat widget within its OPAC. What I've really wanted to do since then was also embed it within the bibliographic databases, where students spend even more time. I tried a couple of times with ezproxy's search and replace feature, but never got very far. A couple of weeks ago we had a visit by our EBSCO rep, and on one of the slides he pointed out that they now allow just this feature! I found the instructions on where to stick this code a little lacking, so here's a little more info. and then scroll down towards the bottom and choose to Modify the Additional Resources section. Once in there, you want to Add an Item, and then switch to the Custom HTML radio button. And the end result, depending on how many columns you have set for your EBSCO display, will put the chat widget in the lower right corner of your results pages:

Related: