background preloader

Bing Maps Developer Resources: Map SDKs, APIs, Tips, Training

Bing Maps Developer Resources: Map SDKs, APIs, Tips, Training

Utilizzo di PHP 5 le funzioni DOM per creare file XML da dati SQL By Tony Marston 22nd August 2004 Intended AudiencePrerequisitesMultiple occurrences of a single tableA One-to-Many relationshipAdding optional attributesUsing Multi-Byte CharactersConclusionReferencesAmendment History Intended Audience This tutorial is intended for developers who wish to extract data from a database and insert it into XML files so that it can be processed in some way, usually by transforming it into HTML using an XSL file. This method completely splits the presentation layer (i.e. the generation of HTML documents) from the business layer (the application of business rules using a language such as PHP) so that any one of these layers can be modified without affecting the other. In the samples below the code is generic in that no column names are ever hard coded. In the samples below I will show how to deal with data from a single table, and then data from two tables with a one-to-many relationship. Prerequisites Multiple occurrences of a single table <? echo $xml_string; ? <? <? <?

simple - GeoRSS GeoRSS ::Geographically Encoded Objects for RSS feeds GeoRSS Simple The Simple serialization of GeoRSS is designed to be maximally concise, in both representation and conception. Each of the four GeoRSS objects require only a single tag. This simplicity comes at the cost of direct upward compatibility with GML. Some publishers and users may prefer to seperate lat/long pairs by a comma rather than whitespace. The first example shows GeoRSS Simple within an Atom 1.0 entry. Geometry Point A point contains a single latitude-longitude pair, separated by whitespace. <? Line A line contains a space seperated list of latitude-longitude pairs, with each pair separated by whitespace. <georss:line>45.256 -110.45 46.46 -109.48 43.84 -109.86</georss:line> Polygon A polygon contains a space seperated list of latitude-longitude pairs, with each pair separated by whitespace. <georss:polygon> 45.256 -110.45 46.46 -109.48 43.84 -109.86 45.256 -110.45 </georss:polygon> Box Additional Properties Elevation Radius

Importing and Mapping Data This article describes how to import shapes into a map from three different types of resources: GeoRSS, Bing Maps, and KML. It also describes how to work with custom icons on a map when importing data from one of these resource types. The entire listing for the source file developed in this article is available in the Source Listing section. Creating a Basic Map Create the file Find.html and add the code shown in Listing 1 to that file. <! Listing 1. If you open this file in a Web browser, you should see something like the map shown in Figure 1. Figure 1. Basic Shapes Shapes can be added or deleted to any map, and can have their display icons and pop-up information modified. Adding a Pushpin Shape to the Map You can add a pushpin to a map using the VEShape class. The first parameter is a VEShapeType object defining the type of shape. The second parameter is a VELatLong object defining the location. Add a pushpin to the center of the map by adding the code in Listing 2 to the OnPageLoad method.

Related: