POST
|
Thank u all I am trying to do the extend in the following way.But getting error "Error message: ReferenceError: graphicsUtils is not defined". How to solve this? <script type="text/javascript" src="http://js.arcgis.com/3.14/"></script> <script src="Scripts/jquery-2.1.1.js" type="text/javascript"></script> <script type="text/javascript"> window.onerror = function (msg, url, linenumber) { alert('Error message: ' + msg + '\nURL: ' + url + '\nLine Number: ' + linenumber); return true; } dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); dojo.require("esri.dijit.BasemapGallery"); dojo.require("dijit.Tooltip"); dojo.require("dijit.form.Button"); dojo.require("dijit.Menu"); dojo.require("esri.dijit.Popup"); dojo.require("esri.dijit.PopupTemplate"); dojo.require("esri.graphicsUtils"); function setextent() { var graphics = graphicsUtils.graphicsExtent(graphicsLayer.graphics); map.setExtent(graphics); }
... View more
09-23-2015
10:33 AM
|
0
|
1
|
1487
|
POST
|
Yes. Exactly. I tried this also but not working fine.3.0" is old. I have to erase google map from my solution I think.
... View more
09-21-2015
06:46 AM
|
1
|
2
|
1248
|
POST
|
Let talk about current api. For zooming to one point map.centerAndZoom(geomPoint, 16); is working fine. My problem is how to zoom all graphics in a visible area?If I added 5 graphics n a graphiclayer through button click , I want to give the visibility of all these 5 graphics. I used graphicallayer.FullExtent in silverlight
... View more
09-21-2015
06:38 AM
|
0
|
4
|
1487
|
POST
|
Chris, Will do as suggested. In this case any sample available for using googlemap also?
... View more
09-21-2015
06:36 AM
|
0
|
4
|
1248
|
POST
|
Robert, Thank U. I am trying googlemap also in our application . For that I used below link. If I will change JSAPI to latest many script errors getting Google Maps Layer in ArcGIS JS API
... View more
09-21-2015
06:23 AM
|
0
|
6
|
1487
|
POST
|
Tim, src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"> If I will change this 2.4 to 3.14, Then many script errors will get. I tried once and I should use the ESRI map as base layer otherwise googlemap will not work.
... View more
09-21-2015
06:13 AM
|
0
|
6
|
1248
|
POST
|
After adding graphics trying to zoom map using the code below. But it is giving script error.How to zoom map with all graphics visibility? <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"> //ADDING GRAPHICS var geomPoint = new esri.geometry.Point(list.d[recordcount].ELon, list.d[recordcount].ELat, new esri.SpatialReference({ wkid: 2278 })); geomPoint = esri.geometry.geographicToWebMercator(geomPoint); var symbol = new esri.symbol.PictureMarkerSymbol({ "url": colourstyle, "height": 16, "width": 16, "type": "esriPMS" }); var infoTemplate = new esri.InfoTemplate(); infoTemplate.content = strhotspot; var pointGraphic = new esri.Graphic(geomPoint, symbol); pointGraphic.setInfoTemplate(infoTemplate); graphicsLayer.add(pointGraphic); //Getting Extent //var zoomExtent = esri.graphicsExtent(graphicsLayer.graphics); //map.setExtent(zoomExtent); var lyrExtent = esri.geometry.geographicToWebMercator(esri.graphicsExtent(graphicsLayer.graphics));
... View more
09-20-2015
11:25 PM
|
0
|
8
|
5575
|
POST
|
Hi All,Thank u for ur time The following is the javascript I am using to load google and esri map Here I am planning to use google map with free of cost with size width < 640 and height < 640 .In this case how can I resize only googlemap when user click on google map button?Help [plssssss <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Map.aspx.vb" Inherits="Default2" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Google Maps Layer in ArcGIS JS API</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css"/> <style type="text/css"> html, body, #mapDiv{ padding: 0; margin: 0; height: 100%; z-index: -1; } .auto-style3 { height: 20px; } .auto-style6 { height: 2%; width: 279px; } .auto-style7 { width: 279px; } #TxtAltareeqEng { width: 55px; } #TxtAltareeqEng0 { width: 55px; } </style> <script type="text/javascript"> var djConfig = { parseOnLoad: true, baseUrl: './', modulePaths: { // if use local copy, make sure the path reference is relative to 'baseUrl', e.g.: //'agsjs': '../build/agsjs' // use absolute path for online version. Note sometimes googlecode.com can be slow. 'agsjs': 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.05/build/agsjs' } }; </script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"> </script> <script type="text/javascript" src="Scripts/gmapslayer_compiled.js"> </script> <script src="Scripts/jquery-2.1.1.js" type="text/javascript"></script> <script type="text/javascript"> window.onerror = function (msg, url, linenumber) { alert('Error message: ' + msg + '\nURL: ' + url + '\nLine Number: ' + linenumber); return true; } dojo.require("esri.map"); dojo.require("dijit.form.Button"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); //dojo.require("agsjs.layers.GoogleMapsLayer"); dojo.require("esri.layers.graphics"); dojo.require("esri.virtualearth.VETiledLayer"); var map; var streetMap, esriTopo, gMap, BingLayer; var graphicsLayer; var Map1, Map2; var lastposdate = ""; var DoorOpenClose = 'NO'; function init() { var initExtent = new esri.geometry.Extent({ "xmin": -14628212, "ymin": 714227, "xmax": 7718305, "ymax": 9832858, "spatialReference": { "wkid": 102100 } }); //alert('init'); map = new esri.Map("mapDiv", { extent: initExtent, logo: true }); Map1 = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"; Map2 = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer"; streetMap = new esri.layers.ArcGISDynamicMapServiceLayer(Map1, { id: "streetMap" }); map.addLayer(streetMap); esriTopo = initLayer(Map2, "esriTopo"); BingLayer = new esri.virtualearth.VETiledLayer({ bingMapsKey: "A......", id: 'BingLayer', mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL }); map.addLayer(BingLayer); gMap = new gmaps.GoogleMapsLayer({ visible: false, id: 'googlemaps' }); map.addLayer(gMap); graphicsLayer = new esri.layers.GraphicsLayer(); map.addLayer(graphicsLayer); var resizeTimer; dojo.connect(map, 'onLoad', function (theMap) { dojo.connect(dijit.byId('map'), 'resize', function () { //resize the map if the div is resized clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { map.resize(); map.reposition(); }, 500); }); }); } function initLayer(url, id) { var layer = new esri.layers.ArcGISDynamicMapServiceLayer(url, { id: id, visible: false }); map.addLayer(layer); return layer; } function changeMap(layers) { hideImageTiledLayers(layers); for (var i = 0; i < layers.length; i++) { layers.show(); alert(layers.id); } } function hideImageTiledLayers(layers) { for (var j = 0, jl = map.layerIds.length; j < jl; j++) { var layer = map.getLayer(map.layerIds ); if (dojo.indexOf(layers, layer) == -1) { layer.hide(); } } } dojo.addOnLoad(init) </script> </head> <body class="claro" > <form id="form1" runat="server"> <div style="width: 100%; height: 100%"> <table id="Tablecontrols0" style="font-size: 15px; z-index: 101; background-color: #5B748B; width: 100%; height: 100%;"> <tr style="font-family: Times New Roman"> <td style="border-style: none; background-color: #496277; " valign="top" class="auto-style6" > </td> <td align="left" style="border-style: none; background-color: #496277; height: 2%;" valign="top" class="auto-style3" > </td> </tr> <tr style="font-family: Times New Roman"> <td style="border-style: none;" valign="top" bgcolor="#496277" > </td> <td style="border-style: none; background-color: white; height: 500px;" valign="top" id="td11" > <div id="mapDiv" runat ="server" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000; visibility: visible; height: 100%; "> <br /> <br /> </div> <div id="buttons" style="position:absolute; right:75px; top:83px; z-Index:999;"> <button dojoType="dijit.form.Button" onClick="changeMap([streetMap]);"> Al Tareeq(EN)</button> <button dojoType="dijit.form.Button" onClick="changeMap([esriTopo]);"> Al Tareeq(AR) </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('roadmap')"> Google Street </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('satellite')"> Google Statellite </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('hybrid')"> Google Hybrid </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('terrain')"> Google Terrain </button> <button dojoType="dijit.form.Button" onClick="changeMap([BingLayer]);BingLayer.setMapStyle('esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL');"> Bing Aerial </button> <button dojoType="dijit.form.Button" onClick="changeMap([BingLayer]);BingLayer.setMapStyle('esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL');"> Bing Aerial with labels </button> <button dojoType="dijit.form.Button" onClick="changeMap([BingLayer]);"> Roads </button> </div> </td> </tr> </table> </div> </form> </body> </html>
... View more
09-20-2015
09:53 AM
|
0
|
0
|
2813
|
POST
|
Hi All, Urgent ...Pls help me. Bing map is not loading in my application .It is showing blank screen. Rest all maps working fine.Pls Help.Bing map key I used is correct java script used below <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Map.aspx.vb" Inherits="Default2" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Google Maps Layer in ArcGIS JS API</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css"/> <style type="text/css"> html, body, #mapDiv{ padding: 0; margin: 0; height: 100%; z-index: -1; } .auto-style3 { height: 20px; } .auto-style6 { height: 2%; width: 279px; } .auto-style7 { width: 279px; } #TxtAltareeqEng { width: 55px; } #TxtAltareeqEng0 { width: 55px; } </style> <script type="text/javascript"> var djConfig = { parseOnLoad: true, baseUrl: './', modulePaths: { // if use local copy, make sure the path reference is relative to 'baseUrl', e.g.: //'agsjs': '../build/agsjs' // use absolute path for online version. Note sometimes googlecode.com can be slow. 'agsjs': 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.05/build/agsjs' } }; </script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"> </script> <script type="text/javascript" src="Scripts/gmapslayer_compiled.js"> </script> <script src="Scripts/jquery-2.1.1.js" type="text/javascript"></script> <script type="text/javascript"> window.onerror = function (msg, url, linenumber) { alert('Error message: ' + msg + '\nURL: ' + url + '\nLine Number: ' + linenumber); return true; } dojo.require("esri.map"); dojo.require("dijit.form.Button"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); //dojo.require("agsjs.layers.GoogleMapsLayer"); dojo.require("esri.layers.graphics"); dojo.require("esri.virtualearth.VETiledLayer"); var map; var streetMap, esriTopo, gMap, BingLayer; var graphicsLayer; var Map1, Map2; var lastposdate = ""; var DoorOpenClose = 'NO'; function init() { var initExtent = new esri.geometry.Extent({ "xmin": -14628212, "ymin": 714227, "xmax": 7718305, "ymax": 9832858, "spatialReference": { "wkid": 102100 } }); //alert('init'); map = new esri.Map("mapDiv", { extent: initExtent, logo: true }); Map1 = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"; Map2 = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer"; streetMap = new esri.layers.ArcGISDynamicMapServiceLayer(Map1, { id: "streetMap" }); map.addLayer(streetMap); esriTopo = initLayer(Map2, "esriTopo"); BingLayer = new esri.virtualearth.VETiledLayer({ bingMapsKey: "A......", id: 'BingLayer', mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL }); map.addLayer(BingLayer); gMap = new gmaps.GoogleMapsLayer({ visible: false, id: 'googlemaps' }); map.addLayer(gMap); graphicsLayer = new esri.layers.GraphicsLayer(); map.addLayer(graphicsLayer); var resizeTimer; dojo.connect(map, 'onLoad', function (theMap) { dojo.connect(dijit.byId('map'), 'resize', function () { //resize the map if the div is resized clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { map.resize(); map.reposition(); }, 500); }); }); } function initLayer(url, id) { var layer = new esri.layers.ArcGISDynamicMapServiceLayer(url, { id: id, visible: false }); map.addLayer(layer); return layer; } function changeMap(layers) { hideImageTiledLayers(layers); for (var i = 0; i < layers.length; i++) { layers.show(); alert(layers.id); } } function hideImageTiledLayers(layers) { for (var j = 0, jl = map.layerIds.length; j < jl; j++) { var layer = map.getLayer(map.layerIds ); if (dojo.indexOf(layers, layer) == -1) { layer.hide(); } } } dojo.addOnLoad(init) </script> </head> <body class="claro" > <form id="form1" runat="server"> <div style="width: 100%; height: 100%"> <table id="Tablecontrols0" style="font-size: 15px; z-index: 101; background-color: #5B748B; width: 100%; height: 100%;"> <tr style="font-family: Times New Roman"> <td style="border-style: none; background-color: #496277; " valign="top" class="auto-style6" > </td> <td align="left" style="border-style: none; background-color: #496277; height: 2%;" valign="top" class="auto-style3" > </td> </tr> <tr style="font-family: Times New Roman"> <td style="border-style: none;" valign="top" bgcolor="#496277" > </td> <td style="border-style: none; background-color: white; height: 500px;" valign="top" id="td11" > <div id="mapDiv" runat ="server" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000; visibility: visible; height: 100%; "> <br /> <br /> </div> <div id="buttons" style="position:absolute; right:75px; top:83px; z-Index:999;"> <button dojoType="dijit.form.Button" onClick="changeMap([streetMap]);"> Al Tareeq(EN)</button> <button dojoType="dijit.form.Button" onClick="changeMap([esriTopo]);"> Al Tareeq(AR) </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('roadmap')"> Google Street </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('satellite')"> Google Statellite </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('hybrid')"> Google Hybrid </button> <button dojoType="dijit.form.Button" onClick="changeMap([gMap]);gMap.setMapTypeId('terrain')"> Google Terrain </button> <button dojoType="dijit.form.Button" onClick="changeMap([BingLayer]);BingLayer.setMapStyle('esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL');"> Bing Aerial </button> <button dojoType="dijit.form.Button" onClick="changeMap([BingLayer]);BingLayer.setMapStyle('esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL');"> Bing Aerial with labels </button> <button dojoType="dijit.form.Button" onClick="changeMap([BingLayer]);"> Roads </button> </div> </td> </tr> </table> </div> </form> </body> </html>
... View more
09-19-2015
07:44 AM
|
0
|
11
|
4694
|
POST
|
Dear all, Here I am very much forced to change silverlight API to javascript API in our web application. I am very new in Java and just trying to develop the web application in javascript. I need to write all coding in vb.net except map display. For that I wrote the code below. Here init() function calling from page load.My problem is when I am trying to add some graphics it is giving me error "map is undefined". How can I solve that?Please note If I will call addgraphics function from input button click then it is not showing any error 1.Is it possible to add graphic from code behind using vb.net?If S how can I access map variable from code behind Protected Sub Page_LoadComplete(sender As Object, e As EventArgs) Handles Me.LoadComplete ScriptManager.RegisterStartupScript(Me, Me.GetType(), "init", "init();", True) End Sub 2. <title>Google Maps Layer in ArcGIS JS API</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css"/>
<style>
html, body, #mapDiv{
padding: 0;
margin: 0;
height: 100%;
z-index: -1;
}
.auto-style1 {
}
.auto-style2 {
height: 20px;
}
.auto-style3 {
height: 20px;
}
.auto-style4 {
text-align: left;
}
.auto-style5 {
width: 137px;
}
.auto-style6 {
height: 2%;
width: 279px;
}
.auto-style7 {
width: 279px;
}
#TxtAltareeqEng {
width: 55px;
}
#TxtAltareeqEng0 {
width: 55px;
}
</style>
<script type="text/javascript">
var djConfig = {
parseOnLoad: true,
baseUrl: './',
modulePaths: {
// if use local copy, make sure the path reference is relative to 'baseUrl', e.g.:
//'agsjs': '../build/agsjs'
// use absolute path for online version. Note sometimes googlecode.com can be slow.
'agsjs': 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.05/build/agsjs'
}
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4">
</script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("agsjs.layers.GoogleMapsLayer");
dojo.require("esri.layers.graphics");
var map;
var streetMap, esriTopo, gMap;
var AltareeqArb, AltareeqEng;
function init() {
var initExtent = new esri.geometry.Extent({
"xmin": -14628212,
"ymin": 714227,
"xmax": 7718305,
"ymax": 9832858,
"spatialReference": {
"wkid": 102100
}
});
map = new esri.Map("mapDiv", {
extent: initExtent,
logo: true
});
AltareeqEng = document.getElementById('TxtAltareeqEng').value;
AltareeqArb = document.getElementById('TxtAltareeqArb').value;
AltareeqEng = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer";
AltareeqArb = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer";
streetMap = new esri.layers.ArcGISDynamicMapServiceLayer(AltareeqEng, {
id: "streetMap"
});
map.addLayer(streetMap);
esriTopo = initLayer(AltareeqArb, "esriTopo");
gMap = new agsjs.layers.GoogleMapsLayer({
id: 'googlemaps',
visible: false,
});
map.addLayer(gMap);
//resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in
//the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_guidelines.htm
var resizeTimer;
dojo.connect(map, 'onLoad', function (theMap) {
dojo.connect(dijit.byId('map'), 'resize', function () { //resize the map if the div is resized
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function () {
map.resize();
map.reposition();
}, 500);
});
});
}
function addgraphic() {
var infoTemplate = new esri.InfoTemplate();
var symbol = new esri.symbol.SimpleMarkerSymbol();
symbol.setColor(new dojo.Color([0, 0, 255]));
var cityLayer = new esri.layers.GraphicsLayer();
map.addLayer(cityLayer);
var geomPoint = new esri.geometry.Point(2022981.06, 13591805.53, new esri.SpatialReference({ wkid: 2278 }));
var pointGraphic = new esri.Graphic(geomPoint, symbol);
infoTemplate.content = 'dfdsfs'
pointGraphic.setInfoTemplate(infoTemplate);
cityLayer.add(pointGraphic);
}
function initLayer(url, id) {
var layer = new esri.layers.ArcGISDynamicMapServiceLayer(url, {
id: id,
visible: false
});
map.addLayer(layer);
return layer;
}
function changeMap(layers) {
hideImageTiledLayers(layers);
for (var i = 0; i < layers.length; i++) {
layers.show();
}
}
function hideImageTiledLayers(layers) {
for (var j = 0, jl = map.layerIds.length; j < jl; j++) {
var layer = map.getLayer(map.layerIds );
if (dojo.indexOf(layers, layer) == -1) {
layer.hide();
}
}
}
</script>
... View more
09-10-2015
01:49 PM
|
0
|
2
|
2800
|
POST
|
Hi All, Can anyone help me to solve the issue?I dont know anything about Java. Silverlight issues pushing me to go with Javascript API. Without help I cannot move. I added the Dynamic map through javascript API successfully. I would like to write all other code in vb.net. For that I am trying the code behind like below Imports ESRI.ArcGIS.Client Partial Class Default2 Inherits System.Web.UI.Page Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim displayExtent As New ESRI.ArcGIS.Client.Geometry.Envelope(23, 34, 33, 44) DynamicMapServiceLayer.ZoomTo(displayExtent) End Sub End Class Here I am getting error like below. How can I solve this? Error 11 Reference required to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' containing the base class 'System.Windows.DependencyObject'. Add one to your project. My Default.aspx page design below <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> </form> </body> </html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map and add a dynamic layer</title> <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css"/> <style> html, body, #mapDiv{ padding: 0; margin: 0; height: 100%; } </style> <script src="http://js.arcgis.com/3.14/"></script> <script> var map; require([ "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ImageParameters" ], function ( Map, ArcGISDynamicMapServiceLayer, ImageParameters) { map = new Map("mapDiv", { sliderOrientation: "horizontal" }); var imageParameters = new ImageParameters(); imageParameters.format = "jpeg"; //set the image type to PNG24, note default is PNG8. //Takes a URL to a non cached map service. var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer", { "opacity": 0.5, "imageParameters": imageParameters }); map.addLayer(dynamicMapServiceLayer); }); </script> </head> <body> <div id="mapDiv"></div> </body> </html>
... View more
08-19-2015
09:20 AM
|
0
|
0
|
225
|
POST
|
Dear Friends, I just started to move technology of my web application from silverlight to Javascript API. I wanted to do only map display in Java. rest all code need to write with vb.net. Any samples available for that? Pls see my design code below.Here map display working perfect When I click show report button, The map should zoom to a particular location for Eg long: 52.899, Lat :23.444 How to write code behind in vb.net for adding a graphic icon on a particular location? Can anyone hwlp me? Default.aspx design page code below <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title>Mapping</title> <style type="text/css"> .auto-style2 { width: 260px; height: 100%; } .auto-style3 { width: 100%; height: 100%; } </style> </head> <body style="background-image: url('Images/menubackground.png');" > <form id="form2" runat="server"> <div style="width: 100%; height: 100%"> <table id="Tablecontrols0" style="font-size: 15px; z-index: 101; background-color: #5B748B; width: 100%; height: 100%;"> <tr style="font-family: Times New Roman"> <td style="border-style: none; background-color: #496277; height: 2%;" valign="top" class="auto-style2" > </td> <td align="left" style="border-style: none; background-color: #496277; height: 2%;" valign="top" class="auto-style3" > </td> </tr> <tr style="font-family: Times New Roman"> <td style="border-style: none;" valign="top" bgcolor="#496277" > <table id="Tablecontrols" style="border-color: #F2F0EE; font-size: 15px; z-index: 101; background-color: #496277; width:auto; height: 274px; font-family: verdana; color: tomato; font-weight: bold; border-top-style: none;" align="left"> <tr style="font-family: Times New Roman"> <td colspan="2" rowspan="1" style="border-width: 2px; font-weight: bold; position: static; height: 24px; text-align: center; border-top-color: #547289; border-bottom-color: #547289; border-top-style: solid; border-bottom-style: solid;" valign="top" align="left"> <br /> <asp:LinkButton ID="LnkLastPosition" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="11pt" Height="21px" Style="text-align: center; font-size: 15px;" ToolTip="Click here for Viewing Reports" Width="153px" Font-Italic="False" Font-Underline="False" ForeColor="Black" BackColor="#F2F0EE" BorderStyle="Solid" BorderWidth="1px">Show Report</asp:LinkButton> <br /> <br /> </td> </tr> <tr style="font-family: Times New Roman"> <td colspan="2" style="font-weight: bold; position: static; height: 24px; text-align: center; border-top-color: #F2F0EE; border-bottom-color: #F2F0EE;" valign="top" align="center"> </td> </tr> </table> </td> <td style="border-style: none; background-color: transparent; background-image: url('Images/menubackground.png');" valign="top" id="td11" > <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map and add a dynamic layer</title> <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css"/> <style> html, body, #mapDiv{ padding: 0; margin: 0; height: 100%; } </style> <script src="http://js.arcgis.com/3.14/"></script> <script> var map; require([ "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ImageParameters" ], function ( Map, ArcGISDynamicMapServiceLayer, ImageParameters) { map = new Map("mapDiv", { sliderOrientation: "horizontal" }); var imageParameters = new ImageParameters(); imageParameters.format = "jpeg"; //set the image type to PNG24, note default is PNG8. //Takes a URL to a non cached map service. var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer", { "opacity": 0.5, "imageParameters": imageParameters }); map.addLayer(dynamicMapServiceLayer); }); </script> </head> <body> <div id="mapDiv"> </div> </body> </html> </td> </tr> </table> </div> </form> </body> </html>
... View more
08-18-2015
10:04 AM
|
0
|
1
|
2386
|
Title | Kudos | Posted |
---|---|---|
1 | 09-29-2015 08:20 PM | |
1 | 09-21-2015 06:46 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|