Getting started with mappoint Web Service version 3.5
By Laura Flanders, Microsoft Corporation Translated by Min Yong
Mappoint is a business of Microsoft that provides XML-based Web Services. Developers can integrate their location-based services (such as map, driving guide, and approximate search) into their own applications and business processes. When you use the map or navigation service on any websit
Mappoint Introduction: mappoint is a business department of Microsoft that provides XML-based Web Services. Developers can integrate their location-based services (for example, MAP, driving guide, and approximate search) go to your own applications and business processes. When you use the map or navigation service on any website of Microsoft or Microsoft partners, the
Map points can be constructed from keyframes or through normal frames, but ultimately, the map points constructed from normal frames are only temporarily used for tracking by tracking, which correspond to keyframes.Constructors (map point 3D coordinates and their reference frames):// A reference frame is a keyframe that corresponds to a number of frame keyframes, establishing a common view between keyframes Mappoint::
In mappoint, the general method for inserting pushpin is:Mappoint. pushpin PII = map. addpushpin (LOC, "name1 ");If (balloonstate = 0)Pii. balloonstate = geoballoonstate. geodisplayballoon;Else if (balloonstate = 1)Pii. balloonstate = geoballoonstate. geodisplayname;ElsePii. balloonstate = geoballoonstate. geodisplaynone;Pii. symbol = symbol;Pii. Highlight = highlight;Pii. Note = "info1 ";However, it takes about 9 minutes to insert a large number of t
Interface Design is the core of web service. Well-designed interfaces not only reduce the difficulty of user development, but also improve the efficiency of network interaction. To reduce the number of network interactions, we should try our best to design interfaces with a large granularity. Next we will look at how mappoint Web service is designed.
Mappoint web service mainly includes four services: Commo
: mappoint = map. tomapfromstage (event. stagex, event. stagey );If (m_firstpoints = NULL){M_firstpoints = new array ();}M_firstpoints.push (m_point );}// Process double-click eventsPublic Function map_mousedoubleclickhandler (Event: mouseevent): void{M_gbjgeometry = new polyline ();// Define the military label PolygonIf (m_firstpoints.length {M_firstpoints.splice (0 );Alert. Show ("Please click at least three points to complete the painting of the mi
graphic:In XAML
Copy code
In code-behindGraphic G = new graphic ()2. Set the geometry and symbol attributes of graphic:In XAML
Copy code
In code-behind
Graphic G = new graphic ()
{
Geometry = new mappoint (108, 30 ),
Symbol = new simplemarkersymbol ()
{
Color = new solidcolorbrush (colors. Blue ),
Size = 12,
Style = simplemarkersymbol. simplemarkerstyle. Square
}
code
In code-behindGraphic g = new Graphic ()2. Set the Geometry and Symbol attributes of Graphic:In xaml
Copy code
In code-behind
Graphic g = new Graphic ()
{
Geometry = new MapPoint (108, 30 ),
Symbol = new SimpleMarkerSymbol ()
{
Color = new SolidColorBrush (Colors. Blue ),
Size = 12,
Style = SimpleMarkerSymbol. SimpleMarkerStyle. Square
}
};
Copy code
3. Add the defined Graphic to GraphicsLayer:In xaml
You can query the geographical longitude and latitude coordinates of an IP address based on the IP address. For example, in the following example, the IP address 58.192.32.1 is located at 118.777802 and 32.061699, which is the location of Nanjing University.
[Java]// ----------------------------------- PACKAGE ------------------------------------Package com. pstreets. gisengine. demo. rim;// ------------------------------------- IMPORTS ------------------------------------Import com. mapdigit. g
is to create a close to real book information browsing software. We first create a user interface, then use the Web service to get the book information, and then we need to invoke the API via P/invoke to control the cursor type (not so complicated in. NET CF 2.0), and finally, to cope with the state of offline, You also need to use XML to cache the data locally. This experiment has not been used in China.Recommended index: ★★★★☆Knowledge Points: 1, creating a complex user interface2, using Web
We show you how to build a location awareness task list application for a windows mobile device that uses GPS to send you a task reminder at the appropriate time and location.
Download the sample source code or material in this article
This article uses the following technologies:
Windows Mobile 6, mappoint
This article introduces the following:
Mappoint Web Service
Cache tasks and maps
Obtain the required
Coordinate Conversion between Baidu navigation SDK and iOS navigation sdk
Examples of code for converting coordinates of Baidu navigation iOS SDK. For more information, see.
// Navigation coordinate --------------> map coordinate
// Assume that the coordinate obtained from the navigation sdk is (116.304847, 40.025281)// (1) construct the input parameter BNPosition required by the Conversion FunctionBNPosition * naviPos = [[BNPosition alloc] init];NaviPos. x = 116.304847;NaviPos. y = 40.025281;/
Arcgis api for flex advanced topic (2) Development of Custom Controls
Arcgis api for flex only provides two controls: Navigation and ScaleBar.
Describe in detail how to develop custom controls (or, maybe, I did not find them ),
The following describes my methods. To control the dynamic display of the current mouse longitude and latitude on the map
.
1. Define the control class and integrate UIComponent to implement the IMapAware interface.
2. Reload the createChildren function.
3. Implement the
see, the intersection of non-riverbanks on the left and right boundary is located at the edge of the grid. Assume that the area of the grid rectangle is (xmin, ymin, xmax, Ymax ), the X coordinates of these points are xmin or xmax, so we can remove the points on the boundary. However, there is a problem here:
When we divide the data according to a certain step, the entire score may not be fixed, that is, the following situation occurs:
We found that the top and right sides are not just equal.
ArcGIS API for Flex is mainly built on ArcGIS Server rest API. The client has limited functions and many advanced functions are implemented through geometry service and geoprocessing service. However, some simple functions, such as getting the center point of polygon, bring up a custom window at this point. If services are used for interaction, the user experience may deteriorate. Therefore, you can write some code to implement these functions on the client.
Here is the code I wrote to get the
Author: Flyingis
Flex is inherently capable of asynchronous calling, so that Flex can well adapt to common functions in webgis applications. In ArcGIS Flex API, the most typical is dynamic display of geographical element information, for example, if you move the cursor over a geographical element to display the basic information of the element, the "Show InfoWindow on mouse hover" section of ArcGIS Flex API Demo is used as an example.
Code
Code highlighting produced by Actipro CodeHighlighter
1 // turn longitude and latitude to Mercator 2 Public mappoint lonlat2mercator (mappoint lonlat) 3 {4 mappoint Mercator = new mappoint (); 5 double X = lonlat. x * 20037508.34/180; 6 double y = math. log (math. tan (90 + lonlat. y) * Math. (PI/360)/(math. PI/180); 7 y = y * 20037508.34/180; 8 Mercator. X = x; 9 Mercato
you can also use the line elements of a layer. In this article, you can build a grid by yourself to find the nodes where the grid and line elements intersect)
Key code:
A. Construct a straight line based on two points
Public void createline (mappoint P1, mappoint P2) {ESRI. arcGIS. client. geometry. polyline = new ESRI. arcGIS. client. geometry. polyline (); ESRI. arcGIS. client. geometry. pointcollection
elementlayer. For example:
Elementlayer chartlayer = new elementlayer (); chartlayer. ID = "Statistical layer"; chartlayer. Opacity = 0.7;// G is the input statistical element (point, surface, line) mappoint = G. geometry as ESRI. arcGIS. client. geometry. mappoint; // set this parameter to control the position of the Statistical Chart. Envelope extent = new envelope (
1.mappoint.hThere is a class MapPoint, which has two constructors. For each, the reference frame is the case where keyframes and parameters are normal frames. 1 MapPoint (const Cv::mat pos, keyframe* prefkf, map* pMap); MapPoint (const cv::mat pos, constint idxf); [Email protected] Pos, which refers to the 3D position of the point. 2 @pRefKF, refer
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.