POST
|
I have created a simple Dynamic map layer and adding custom graphics by looping through Jason with custom infotemplate. I want to show popup or infowindow with custom info when user clicks on a custom graphics. How to achieve this, I have tried several ways but not able to make it work. My latest code looks like this and it doesn't work. I can see all my custom graphics but nothing is happening when I click on a graphics. <script type="text/javascript"> var djConfig = { parseOnLoad: true }; </script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.layers.agstiled"); dojo.require("esri.toolbars.draw"); dojo.require("esri.SnappingManager"); dojo.require("esri.toolbars.edit"); dojo.require("dijit.form.Button"); dojo.require("dijit.Menu"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.dijit.InfoWindowLite"); dojo.addOnLoad(init); var map, tb; function init() { map = new esri.Map("map"); dojo.connect(map, "onLoad", initToolbar); map.infoWindow.resize(200, 75); map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("****/ArcGIS/rest/services/Continents/MapServer")); var infoTemplate = new esri.InfoTemplate(); infoTemplate.setTitle("${NAME}"); infoTemplate.setContent("<b>URL Is: </b><a href='https://community.esri.com/test/'>${URL}</a><br/>"); createDynamicGraphicsFromLocation(JasonObj); } function createDynamicGraphicsFromLocation(JasonObj) { var geoValues = JasonObj dojo.forEach(geoValues.split('$'), function (pt, i) { var symbol; var geometryObj; if (pt.split('£')[0] == 'point') { symbol = tb.markerSymbol; geometryObj = new esri.geometry.Point(dojo.fromJson(pt.split('£')[1])); var graphic = new esri.Graphic(geometryObj, symbol); graphic.setAttributes({ "URL": "URLTest" }); graphic.setAttributes({ "Name": "TestName" }); var infoTemplate = new esri.InfoTemplate(); infoTemplate.setTitle("${NAME}"); infoTemplate.setContent("<b>URL Is: </b><a href='https://community.esri.com/test/'>${URL}</a><br/>"); graphic.setInfoTemplate(infoTemplate); map.graphics.add(graphic); } }); }
... View more
01-12-2012
02:02 AM
|
0
|
2
|
2684
|
POST
|
Bump..# Sorry I did not receive any reply, I am trying my luck again. Mean while we found ArcObjects (.Net) as well, looks interesting. Can we make use of it? Regards, Andrew
... View more
10-17-2011
01:10 AM
|
0
|
0
|
215
|
POST
|
Hello All, Sorry for the newbee question. We are investigating various options to integrate Geo Spatial data in SharePoint 2007(MOSS 2007). Users should be able to geo-tag documents, list items and should be able to search the documents and list item by location, we have ArcGIS-ESRI based map server. What is the best way to integrate, I was looking in Arc GIS resource centre I can see api???s for Silverlight, Javascript and Flex, which one should we choose and why? We are happy to do custom development in SharePoint and c#, we need a direction. Any advice is much appreciated. Regards, Andrew
... View more
09-27-2011
07:32 AM
|
0
|
2
|
468
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|