|
POST
|
Solved by using $.support.cors = true; since $ is an alias for jQuery. Thank.
... View more
01-22-2014
08:28 AM
|
0
|
0
|
1413
|
|
POST
|
In one of my project, I got such an error: microsoft jscript runtime error 'jquery' is undefined by hitting the code: $jQuery.support.cors = true; Actually, I did have the reference: <script src="http://code.jquery.com/jquery-1.10.2.js" type="text/javascript" /> In another project, I used the same code and it run fine. What's the possible reason for it? Should I have a dojo.require("") for the jquery? If yes, what string should be put into the dojo.require()? Thanks.
... View more
01-22-2014
08:12 AM
|
0
|
4
|
2019
|
|
POST
|
Found to be very simple, just add pSegPoly.SpatialReference = point.SpatialReference; Then, the result from ArcGIS Server's SOE service contains the SR as needed. Thread is to be closed.
... View more
01-16-2014
08:16 AM
|
0
|
0
|
633
|
|
POST
|
In a project, I created a polyline through a collection of points. The related code is below: // Create and add segments ISegmentCollection path = new ESRI.ArcGIS.Geometry.PathClass(); object obj = Type.Missing; for (int i = 1; i < pointsCollection.Count; i++) { ILine pLine = CreateLine(pointsCollection[i - 1], pointsCollection); path.AddSegment((ISegment)pLine, ref obj, ref obj); } // Get the Polyline ESRI.ArcGIS.Geometry.IPolyline pSegPoly = new ESRI.ArcGIS.Geometry.PolylineClass(); ESRI.ArcGIS.Geometry.IGeometryCollection pGeoColl = pSegPoly as IGeometryCollection; pGeoColl.AddGeometry((IGeometry)path, ref obj, ref obj); pGeoColl.GeometriesChanged(); // Get json results JsonObject onSegment = Conversion.ToJsonObject((IPolyline)pGeoColl); List<JsonObject> jsonGeometry = new List<JsonObject>(); jsonGeometry.Add(onSegment); JsonObject resultJsonObject = new JsonObject(); resultJsonObject.AddArray("Geometry", jsonGeometry.ToArray()); // Get byte array of json and return results, which will be the output of ArcGIS Server SOE service byte[] result = Encoding.UTF8.GetBytes(resultJsonObject.ToJson()); return result; The data from my ArcGIS Server's service call looks like: { "Geometry": [ { "paths": [ [ [-8575118.2321458999,4707114.1745275566], ... [-8575820.374931246,4707389.1788524361] ] ] } ] } Ideally, after the { } block, there should be "spatialReference":{"wkid":102100}}, which is the same as that of the points in the point collection. How can the SR information be added to the polyline?
... View more
01-16-2014
08:10 AM
|
0
|
1
|
2909
|
|
POST
|
The errors were gone from the files in VS 2010. Not sure why. Thanks to Jon for his valuable response.
... View more
01-16-2014
07:32 AM
|
0
|
0
|
457
|
|
POST
|
weif4314: Thanks for your response. I have done the creation of a Polyline from collection points. For PolylineM, I have not find the approach yet. By the way, I don't need this component for the time-being. The thread is to be closed and your response is to be credited.
... View more
01-15-2014
04:24 AM
|
0
|
0
|
864
|
|
POST
|
Jon: Thanks for your help. The pro. got solved after using correct LAT/LON values.
... View more
01-13-2014
09:29 AM
|
0
|
0
|
1181
|
|
POST
|
Jon: My prob. got solved. The reason was the incorrect SR in my MapService that generates some incorrect map point values. Thanks for your help.
... View more
01-13-2014
09:27 AM
|
0
|
0
|
382
|
|
POST
|
Checked the MainPage.xaml and found several dead ArcGISDynamicMapServiceLayer URLs. After commenting them out, the basemap display. The thread is to be closed. Thanks.
... View more
01-13-2014
05:43 AM
|
0
|
0
|
636
|
|
POST
|
I tried to update a SL project developed a while ago, but got failure to load all of the layers (1 basemap layer sourced from ESRI Street Map, others DynamicMapService layers from valid URLs). Through Fiddler2, I could see a couple of 304 results. If so, how can this problem be fixed. Thanks in advance.
... View more
01-13-2014
04:58 AM
|
0
|
1
|
879
|
|
POST
|
Of course no reason to be rude. Actually, your work is very APPRECIABLE. Have a nice weekend. I will continue my work next Monday. Again, THANKS so much for you valuable time and experience.
... View more
01-10-2014
10:30 AM
|
0
|
0
|
2352
|
|
POST
|
No map displays on my IE. Totally empty page. I don't know why. Maybe the basemap not added?
... View more
01-10-2014
10:15 AM
|
0
|
0
|
2352
|
|
POST
|
This is the message for you to catch up my updated thread.
... View more
01-10-2014
09:48 AM
|
0
|
0
|
2352
|
|
POST
|
To Jon: Changed the wkid to 26973 but still not drawing. Wish have additional hint from you. Thanks. var polylineJson2 = { "paths":[[[201394.01178484457,173661.08635829584],[201392.0117168416,173661.08690949593],[ 201388.01158083565, 173661.08801189612 ],[ 201386.01151283266, 173661.08856309619 ],[ 201384.0114448297, 173661.08911429628 ],[ 201382.0113768267, 173661.08966549637 ],[ 201380.01130882374, 173661.09021669647 ],[ 201378.01124082075, 173661.09076789653 ] ] ],"spatialReference":{"wkid":26973} }; By the way, your previous script (received 2 days ago) works, but the 1 you posted today does not. I just wonder why the polyline2 could not be drawn. Thanks.
... View more
01-10-2014
09:09 AM
|
0
|
0
|
2352
|
|
POST
|
Borrowed someone script that could draw a polyline on map (defined here: var polyline) in Portand, WA. I added var polyline2 with the values, but this line was not drawing. I am new in JS GIS. Please help if you can share your experience. Thanks in advance. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title>Build your first application</title> <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css"> <style type="text/css"> html, body, #map { padding: 0; margin: 0; height: 100%; } </style> <script src="http://js.arcgis.com/3.8/"></script> <script> var map; require(["esri/map", "dojo/ready", "dojo/on", "esri/geometry/Polyline", "esri/graphic", "esri/symbols/SimpleLineSymbol", "dojo/domReady!"], function(Map, ready, on, Polyline, Graphic, SimpleLineSymbol) { var map = new Map("map", { center: [-77.1, 38.9], //longitude, latitude zoom: 11, basemap: "streets", slider: true, //default sliderPosition: "top-left" //default }); ready(function (){ on(map, "load", drawPath); function drawPath(){ var polylineJson = { "paths":[[[-122.68,45.53], [-122.58,45.55], [-122.57,45.58],[-122.53,45.6]]], "spatialReference":{"wkid":4326}}; var polylineJson2 = { "paths":[[[201394.01178484457,173661.08635829584],[201392.0117168416,173661.08690949593],[ 201388.01158083565, 173661.08801189612 ],[ 201386.01151283266, 173661.08856309619 ],[ 201384.0114448297, 173661.08911429628 ],[ 201382.0113768267, 173661.08966549637 ],[ 201380.01130882374, 173661.09021669647 ],[ 201378.01124082075, 173661.09076789653 ] ] ],"spatialReference":{"wkid":102100} }; var polyline = new Polyline(polylineJson); var polylineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3); var g = new Graphic(polyline, polylineSymbol, null, null); map.graphics.add(g); var polyline2 = new Polyline(polylineJson2); var g2 = new Graphic(polyline2, polylineSymbol, null, null); map.graphics.add(g2); } }); }); </script> </head> <body class="claro"> <div id="map"></div> </body> </html>
... View more
01-10-2014
08:21 AM
|
0
|
3
|
1326
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-18-2023 10:02 AM | |
| 3 | 07-14-2023 12:29 PM | |
| 1 | 04-02-2021 12:16 PM | |
| 1 | 07-24-2017 11:31 AM | |
| 1 | 04-04-2016 03:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-01-2025
11:58 AM
|