. arcGIS. client. geometry. envelope (-20037508.3427892,-20037508.3427892, 20037508.3427892, 20037508.3427892) {spatialreference = new spatialreference (102100)}; // spatial Coordinate System of the layer this. spatialreference = new spatialreference (102100); // create the slice information. The size of each slice is 256 * PX, which consists of 16 levels. this. tileinfo = new tileinfo () {Height = 256, width = 256, origin = new mappoint (-cornercoord
Google map and Yahoo map have released their own APIs, which can be used for free. It feels very good. You should think about some problems (note: microsoft's mappoint already has a paid web service, and the desktop version can also be embedded into the application.Program). Google map API is really simple. It only takes two hours to read the document carefully and you can develop it without having to know any professional map knowledge. The API is Ja
. Fromgeographic (New MapPoint (double). Parse (FindResult.Latitute.ToString (). Trim ()), double. Parse (FindResult.Longitute.ToString (). Trim ())))}; Markersymbol symbol = new Markersymbol (); String contentstr = new StreamReader (Application.getresourcestream ( New Uri ("/mapclient;component/template/defaultmarkersymbol.xaml", urikind.relative)) . Stream). ReadToEnd (); Symbol.
) {BOOLYes =false;//Look under the mouse://Use the line to do collision detection of the Earth, according to the mouse click Point to detect, get the intersection point, is the current points of XYZOsg::vec3d world;osgutil::linesegmentintersector::intersections hits;//Determine if the result of the intersection is emptyif(View->computeintersections (x, Y, hits)) {//Get coordinates below the world coordinate system, which is the xyz coordinate of OSGWorld = Hits.begin ()->getworldintersectpoint (
The shortest distance from a point (x3,y3) to a line passing through a point (x1,y1) and a point (X2,y2)public static double Getmindistance (MapPoint pt1, MapPoint pt2, MapPoint pt3){Double dis = 0;if (pt1. X = = Pt2. X{dis = Math.Abs (pt3. X-pt1. X);return dis;}Double Linek = (pt2. Y-pt1. Y)/(pt2. X-pt1. X);Double Linec = (pt2. X * pt1. Y-pt1. X * pt2. Y)/(pt2.
1. Define a maptoolaction to implement the click function. Obtain the basic information of the vertex to be displayed in maptoolaction and save it to webcontext.
// Obtain the click point and save the information as simplepointinfo_ Context =Event. getwebcontext ();Webmap map =_ Context. getwebmap ();Webpoint screenpoint = (webpoint)Event. getwebgeometry ();Webpoint mappoint = (webpoint)Event. getwebgeometry (). tomapgeometry (MAP );SimplepointinfoPoi
As mentioned in the previous blog, dynamic add point, address: http://blog.csdn.net/taomanman/article/details/7354103
Add text information dynamically when adding vertices as needed.
Public void addmarkergraphics () {ESRI. arcGIS. client. projection. webmercator Mercator = new ESRI. arcGIS. client. projection. webmercator (); graphicslayer = mymap. layers ["mygraphicslayer"] As graphicslayer; // Add vertex information graphic = new graphic () {geometry = Mercator. fromgeographic (New
Iipaddressgeocodinglistener {/** * Entry point for application * @param args Comm and line arguments (not used) */public static void main (string[] args) {//Create a new instance of The application and make the currently
Running thread the application ' s event dispatch thread.
Mapipsearchrim Theapp = new Mapipsearchrim ();
Theapp.entereventdispatcher ();
} private MenuItem Mapfindaddressmenuitem = new MenuItem ("Find Address", 0, 0) {public void run () {
Preliminary understanding
A map consists of layers, elements, and styles. There are N layers on the map, and there are n elements on the layer. Each element can store points, lines, and surfaces, and each element can set a style, if an image or text is displayed, you can create an mxml component and set it to the element.
Both the surface and line are composed of points.Add point
1. initialize the graphicslayer.
2. Obtain the coordinate point and mappoint
access the Bing map service normally.8,
Spatialreference
The space reference object can be obtained through mapview or layer. For each map service, it has a corresponding space reference system, this object is often used for query and retrieval or coordinate projection conversion. The usage is as follows:
Double locy = loc. getlatitude (); // latitude double locx = loc. getlongpolling (); // longitude point wgspoint = new point (locx, locy); // converts longitude and latitude coordinates into
You can use the getDirection () method of RasterMap to query the path. Similar to the query address, the path query result notifies the application through the callback function, the following example returns the path from Nanjing to Beijing. The returned results are stored in MapDirection. MapDirection contains detailed information about the path, including each step, length, time, and direction of the path.
[Java]Package com. pstreets. gisengine. demo;Import com. mapdigit. gis. MapDirection;Im
.
Figure 1. Use a MapPoint without a Cookie Session
Assume that you have requested a page similar to http: // yourserver/folder/default. aspx. As you can see from the MapPoint snapshot, the adjacent slashes in front of the resource name are extended to include the brackets filled with the session ID inside, as shown below.
http://yourserver/folder/(sessionIDhere)/default.aspx
The session ID is embe
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.