POST
|
hello,Adam. I HAVE one more problem to ask you again, when i use point(which longitude and latitude are west-longitude 122 and north-latitude 37)in State of California the code is following: private JMap createMap() { // map JMap jMap =new JMap(); //MapOptions mapOptions = new MapOptions(MapType.TOPO); //jMap = new JMap(mapOptions); ArcGISTiledMapServiceLayer basemap = new ArcGISTiledMapServiceLayer(BASEMAP_URL); jMap.getLayers().add(basemap); GraphicsLayer myGraphicsLayer = new GraphicsLayer(); SimpleMarkerSymbol simpleMarker = new SimpleMarkerSymbol(Color.RED, 10, Style.CIRCLE); SpatialReference spatialReference = SpatialReference.create(4326); Point point = GeometryEngine.project(37.6, -122.5, spatialReference); Point point1 = new Point(37.6, -122.5); myGraphicsLayer.addGraphic(new Graphic(point1, simpleMarker)); jMap.getLayers().add(myGraphicsLayer); jMap.setShowingEsriLogo(false); jMap.setExtent(new Envelope(-15967900, 1670500, -6360000, 8079000)); return jMap; } THE red point is supposed to show in State of California,but it is showing nearly by the Africa,it's obviouly wrong. i thought it maybe is because of the SpatialReference is wrong,but what number instead of 4326 I suppose to use? or there is some method to mark the longitude is west-longitude and the latitude is north-latitude? AND the code: jMap.setExtent(new Envelope(-15967900, 1670500, -6360000, 8079000)); the function of this line of code is to set the map-view to Include all the amerian-map. AND I really want to know those number(-15967900, 1670500, -6360000, 8079000) how to create. if those numbers is transformed by Latitude and longitude,please tell how turn Latitude and longitude to those number.
... View more
03-06-2017
12:42 AM
|
0
|
3
|
437
|
POST
|
hello,Adam. I HAVE one more problem to ask you again, when i use point(which longitude and latitude are west-longitude 122 and north-latitude 37)in State of California the code is following: private JMap createMap() { // map JMap jMap =new JMap(); //MapOptions mapOptions = new MapOptions(MapType.TOPO); //jMap = new JMap(mapOptions); ArcGISTiledMapServiceLayer basemap = new ArcGISTiledMapServiceLayer(BASEMAP_URL); jMap.getLayers().add(basemap); GraphicsLayer myGraphicsLayer = new GraphicsLayer(); SimpleMarkerSymbol simpleMarker = new SimpleMarkerSymbol(Color.RED, 10, Style.CIRCLE); SpatialReference spatialReference = SpatialReference.create(4326); Point point = GeometryEngine.project(37.6, -122.5, spatialReference); Point point1 = new Point(37.6, -122.5); myGraphicsLayer.addGraphic(new Graphic(point1, simpleMarker)); jMap.getLayers().add(myGraphicsLayer); jMap.setShowingEsriLogo(false); jMap.setExtent(new Envelope(-15967900, 1670500, -6360000, 8079000)); return jMap; } THE red point is supposed to show in State of California,but it is showing nearly by the Africa,it's obviouly wrong. i thought it maybe is because of the SpatialReference is wrong,but what number instead of 4326 I suppose to use? or there is some method to mark the longitude is west-longitude and the latitude is north-latitude? AND the code: jMap.setExtent(new Envelope(-15967900, 1670500, -6360000, 8079000)); the function of this line of code is to set the map-view to Include all the amerian-map. AND I really want to know those number(-15967900, 1670500, -6360000, 8079000) how to create. if those numbers is transformed by Latitude and longitude,please tell how turn Latitude and longitude to those number.
... View more
03-06-2017
12:41 AM
|
0
|
0
|
437
|
POST
|
thank you so much!!! NOW I can show the map .but it's takes too long to render it. the shapefile that is too big is the reason why? IS there any to solve this problem and if the shapefiles' result is so not good enough,maybe i should to only use the basemap(which its url is World_Street_Map (MapServer) )and not to use the shapefiles.┑( ̄Д  ̄)┍
... View more
03-01-2017
03:05 AM
|
0
|
5
|
1214
|
POST
|
california-latest-free-roads.shp.rar - Google Drive this is the shapefiles in clonddisk lisk. code .txt - Google Drive this is the code text and this is my project.ArcGIS_runtime_java's vision is 10.2.4.I BUILD the project by the steps by the official guide tell me.
... View more
02-28-2017
11:37 PM
|
0
|
7
|
1214
|
POST
|
hello ,Adam.thank you for your answer,how nice of you.these days I have try to solve my problem,but it's still some problem in my project. First,the project can be runing ,and the window can show out,but there is nothing be drawed in the window which is all blank. I FEEL better because it's not be throw out the exception i encounter before. Second,the shapefiles i downdoad can be draw in the Arcmap(desktop vision 10.1),there is a lot of line which represents the road in the Arcmap.I USE the analysisMap function,then it tells me that the map don't have the Spatial Reference or index(in chinese both are same meaning,my Arcmap are chinese vision),which it's a serious warning,and I double-click it ,and then the map was added the Spatial Reference.And the file was added more three new files which is sbn. sbx. and shp.xml.but the window are still all blank. the render code are followed: UniqueValueRenderer uvRenderer = new UniqueValueRenderer( new SimpleLineSymbol(Color.RED, 1), "name"); featureLayer.setRenderer(uvRenderer); jMap.getLayers().add(featureLayer); any error in my code? I KNOW the UniqueValueRenderer class' second parameter is column Header from the dbf.file which you can open it to see it .the sample code is also use the column Header to be the second parameter,and the sample can be drawed.BUT in my projet use it the same way,but it just can't be drawed, Third,you tell me to re-creat the prj,file by Arcmap.I wish i can handle it ,but the function to define the projection have some problems. when I choose my shapefile,it tell that my date set is not exist or not supported. I AM JUST CONFUSED.IF you know something that can help,please let me know.
... View more
02-28-2017
10:04 PM
|
0
|
9
|
1214
|
POST
|
sorry for so late to answer you,and really thank you for the answer.I have been use your method that i change the basemap url become a WKID 3857 one.and the same exception is reported .the following line is the same exception: java.lang.RuntimeException: Invalid argument - unknown wkt at com.esri.core.geodatabase.Geodatabase.nativeOpenShapefile(Native Method) at com.esri.core.geodatabase.Geodatabase.a(Unknown Source) at com.esri.core.geodatabase.ShapefileFeatureTable.<init>(Unknown Source) at ShapefileApp.createMap(ShapefileApp.java:66) at ShapefileApp.createUI(ShapefileApp.java:126) at ShapefileApp$1.run(ShapefileApp.java:104) it's first six line of exception. perhaps there is some problem with the shapefiles that I dowoload.and i have been required to use the California street map in the java project in the end.
... View more
02-22-2017
06:43 PM
|
0
|
11
|
1214
|
POST
|
this problem is kill me out,,,,I am a chinese guy(and a student),but I can barely found any solution about this,even sample.from chinese website 0.0
... View more
02-19-2017
10:20 PM
|
0
|
0
|
1214
|
POST
|
I use the shapefileTable to open the shapefiles on my machine,write with the absolute path.I download the local shapefiles(include .dbf .prj .shp .shx) from google.and all the code are from https://developers.arcgis.com/java/10-2/sample-code/shapefile-feature-layer/ .I only change the shapefileTable line of code. try { shapefileTable = new ShapefileFeatureTable("E:\\antarctica-icesheet-polygons-3857\\icesheet_polygons.shp"); featureLayer = new FeatureLayer(shapefileTable); // create a renderer UniqueValueRenderer uvRenderer = new UniqueValueRenderer( new SimpleFillSymbol(new Color(100, 0, 0, 255), null), "icesheet_polygons"); // set renderer featureLayer.setRenderer(uvRenderer); jMap.getLayers().add(featureLayer); the shapefiels(include .dbf .prj ..sbn .sbx shp .shp.xml .shx) that the sample code use are more.Is that the problem? I HOPE THERE IS SOMEBODY TO HELP ME OUT! THANK YOU!
... View more
02-19-2017
09:50 PM
|
1
|
15
|
3200
|
Title | Kudos | Posted |
---|---|---|
1 | 02-19-2017 09:50 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|