POST
|
I have created a basemap service in arcgis server 10 this has master map and a point layer in. when i open the page the map displays correctly and i am able to seach for a point the map zooms to the point and displays the point however the master map does not draw i have to move the map with the mouse to get the master map to display it is in the correct position so i know my search is working and zooming. I have been over my javascript code below i am now begining to think this is a arcgis server issue any ideas? ______CODE_______________________________________________________________________________________ var map; var findTask, findParams; function init() { map = new esri.Map("map"); var basemap = new esri.layers.ArcGISDynamicMapServiceLayer("http://myserver/ArcGIS/rest/services/BaseMap/MapServer"); map.addLayer(basemap); //Create Find Task using Post code layer findTask = new esri.tasks.FindTask("http://myserver/ArcGIS/rest/services/BaseMap/MapServer/"); //Create the find parameters findParams = new esri.tasks.FindParameters(); findParams.returnGeometry = true; findParams.layerIds = [0]; findParams.searchFields = ["UPRN"]; findParams.outSpatialReference = map.spatialReference; } function doFind() { //Set the search text to the value in the box findParams.searchText = dojo.byId("UPRN").value; findTask.execute(findParams, showResults); } function showResults(results) { map.graphics.clear(); var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 1), new dojo.Color([255, 255, 0, 1])); //Create items array var items = []; for (var i = 0, il = results.length; i < il; i++) { items.push(results.feature.attributes); //append each attribute list as item in store var graphic = results.feature; graphic.setSymbol(symbol); map.graphics.add(graphic); } for (var i = 0, il = map.graphics.graphics.length; i < il; i++) { var currentGraphic = map.graphics.graphics; } var PointExtent = new esri.geometry.Extent(); PointExtent.xmin = currentGraphic.geometry.x - 250.00; PointExtent.ymin = currentGraphic.geometry.y - 250.00; PointExtent.xmax = currentGraphic.geometry.x + 250.00; PointExtent.ymax = currentGraphic.geometry.y + 250.00; map.setExtent(PointExtent); } ___________CODE_______________________________________________________________________________________
... View more
01-29-2013
04:09 AM
|
0
|
3
|
304
|
POST
|
for info this is now working thanks to ESRI consultant it was a setting in iis i ran aspnet_regiis -i This will register ASP.NET 2.0 as the default version with IIS. then restarted iis all working
... View more
07-19-2012
04:53 AM
|
0
|
0
|
372
|
POST
|
I should have asked how do i make an edit via the REST API directly? What i have done is create an editing application in arcgis server and it worked using the same data(end points) so i knoe it was set up correctly. But i work with javascript and dojo so i would like to set up web editing with proxy page.
... View more
07-17-2012
06:25 AM
|
0
|
0
|
372
|
POST
|
Hi i have downloaded one of the sample ESRI editing examples and added my own maps(rest end points) and they are diplaying as they should. I have downloaded the proxy.ashx and proxy.config. I have set my html page to point at the proxy and config as below. My proxy pages are in C:\Inetpub\wwwroot\proxy i have done as advised in another thread and created the proxy folder to an application. esri.config.defaults.io.proxyUrl = "http://myserver/proxy/proxy.ashx"; <serverUrl url="http://myserver/arcgis/rest/services/" matchAll="false"></serverUrl> i have tried IP address and name both dont work. when i run application and try to edit with firebug on i get following error "Unable to load http://myserver/proxy/proxy.ashx?http://myserver/ArcGIS/rest/services/Point/FeatureServer/0/applyEdits status:500" so in my browser on the server that hosts arcserver i try to test proxy page with http://localhost/proxy/proxy.ashx?http://myserver/ArcGIS/rest/services/Point/FeatureServer/0 i get this Server Error in '/proxy' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0234: The type or namespace name 'Generic' does not exist in the class or namespace 'System.Collections' (are you missing an assembly reference?) Source Error: using System.IO; using System.Web; using System.Collections.Generic; using System.Collections; using System.Text; i have researched System.Collections.Generic and i just cant find what is wrong this was in the downloaded file from esri so i have tried with it removed and does not work. Has anyone had this error i have looked on forum and people have had problems with proxy page set up but not the same problem as mine any help would be greatfull.
... View more
07-17-2012
02:51 AM
|
0
|
5
|
792
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|