|
POST
|
I want to create a map viewer app which would work offline. Is there a way to do this using ArcGIS API for javascript? or else what's the best alternative. P.S: I essentially want to work with a basemap and a few graphic layers, no editing involved. was thinking of cacheing tiled map's but don't have clarity on that.
... View more
11-29-2012
09:59 PM
|
0
|
0
|
726
|
|
POST
|
I have used navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN); in my code. It works as required when its activated. On second zoom mouse drag pans the map as well. I have tried to disable pan but with no luck! when i deactivate using navToolbar.deactivate(); and reuse it works fine! any help? I did search around and found this http://forums.arcgis.com/threads/15615-Navigation-toolbar-buttons-work-once-only So its all about jquery and jsapi not going well, suggestions in the above thread didn't work for me!
... View more
11-08-2012
11:45 PM
|
0
|
1
|
701
|
|
POST
|
I had a strange behaviour of popup in my app for a similar kind of approach. On click of grid the popup appears for the first time and when i click on next grid it only zooms to that level but without popup. a click again on the same grid, gets the popup back or even the zoom out of map helps. Not sure why this stuff happens! Trying to replicate the same, couldn't find much luck Here's the fiddle. search for Owner name Katz to see such a behaviour first click on row 192717701 Sidney F Katz Null 1966 1379 Stuyvessant Rd and then on 190745300 Samuel Katz Null 1982 3377 Indian Summer Dr Not sure why this happens with only these two pairs but i have this prob with every row in my app. Whats making this happen?
... View more
10-25-2012
07:04 AM
|
0
|
0
|
3091
|
|
POST
|
I have done similar stuff in my app. on click of Grid you can call the function which fires on click with few modifications.
function onRowClickHandler(evt) {
var ClickedId = grid.getItem(evt.rowIndex).ASSETID;
var selectedId=0;
//var symbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3);
dojo.forEach(advancedMapObj._layers.SearchResultLayer.graphics, function (graphic) {
if ((graphic.attributes) && graphic.attributes.ASSETID === ClickedId) {
selectedId = graphic;
return;
}
});
if(selectedId)
{
var selectedExtent = selectedId.geometry.getExtent();
//selectedId.setSymbol(symbol);
//map.graphics.add(selectedId);
map.setExtent(selectedExtent);
//I wrote this part of code so as to get a point on the polyline i was interested in
var length = graphic.geometry.paths[0].length;
if (length % 2 != 0)
length = length - 1;
var pointxy = graphic.geometry.paths[0][(length / 2)];
Infopoint = new esri.geometry.Point(pointxy[0], pointxy[1], new esri.SpatialReference({ wkid: 102100 }));
//and after setting the info template
map.infoWindow.show(Infopoint,basicMapObj.getInfoWindowAnchor(Infopoint));
}
else
{
alert("Assets not mapped properly");
}
}
... View more
10-14-2012
11:38 PM
|
0
|
0
|
3091
|
|
POST
|
Just messing around with your code, I tried removing the divs from line 191-195 and the advanced map opened full size in the new window. Not sure if those divs will be necessary in your map later on, but hopefully it at least gives you an idea of where to start! Thanks a lot brett. That solved the problem. Still wondering why i had them in place. thanks again.
... View more
09-28-2012
07:32 AM
|
0
|
0
|
762
|
|
POST
|
Not just that, It works in IE and Chrome only on the machine its hosted. Trying from somewhere else the div breaks. I don't see an error. Can somebody guide me?
... View more
09-28-2012
05:04 AM
|
0
|
0
|
762
|
|
POST
|
I have been trying to use two map objects at a time and got them working. but mozilla doesn't help me out. [ATTACH=CONFIG]18046[/ATTACH] Here's how it loads it. It works fine with IE and Chrome. What am i missing? Code is herein attached A click on maximize button will reveal things 🙂
... View more
09-27-2012
07:45 AM
|
0
|
3
|
2934
|
|
POST
|
This works for me in Chrome:
<!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" />
<!--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></title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/js/esri/dijit/css/Popup.css">
<style>
#map{
padding:0;
}
</style>
<script>var dojoConfig = {parseOnLoad: true};</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/"></script>
<script>
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.dijit.Popup");
var map;
function init() {
var initExtent = new esri.geometry.Extent({
"xmin": -9270392,
"ymin": 5247043,
"xmax": -9269914,
"ymax": 5247401,
"spatialReference": {
"wkid": 102100
}
});
//setup the popup window
var popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25]))
}, dojo.create("div"));
map = new esri.Map("map", {
infoWindow: popup,
extent: initExtent,
logo: false,
slider: false,
wrapAround180: true
});
dojo.connect(map, "onLoad", mapReady);
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
var landBaseLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer");
map.addLayer(landBaseLayer);
}
function mapReady(map) {
//resize the map when the browser resizes
dojo.connect(window, 'resize', map, map.resize);
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div style="border-style: none solid solid solid; border-width: thin; border-color: #0099cc; width:345px; height: 281px">
<div style="width:345px; height:30px; overflow:hidden; z-index: -1; color: #FFFFFF; font-style: normal; font-family: Cambria; font-weight: bold; font-size: medium; " title="GIS Map Control">
GIS Map Control
</div>
<div id="map" style="padding:0; width: 345px; height: 251px;position: relative; z-index:0;"></div>
</div>
</body>
</html>
My code was part of a JSP and i was just including this page into the main window. So had removed HTML tags within. Adding <!DOCTYPE html> in the code resolved stuffs!
... View more
09-21-2012
12:22 AM
|
0
|
0
|
468
|
|
POST
|
will changing Maximum Number of Records Returned by Server: parameter in server help?
... View more
09-18-2012
12:40 AM
|
0
|
0
|
1082
|
|
POST
|
Panning doesn't work in chrome and mozilla, it works fine in IE Here's my code..
<style type="text/css">
#map{
padding:0;
}
</style>
<script type="text/javascript">var dojoConfig = { parseOnLoad: true };</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.dijit.Popup");
var map;
var resizeTimer;
var identifyTask, identifyParams;
var attName=new Array();
var attVal=new Array();
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-9270392,"ymin":5247043,"xmax":-9269914,"ymax":5247401,"spatialReference":{"wkid":102100}});
//setup the popup window
var popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25]))
}, dojo.create("div"));
map = new esri.Map("map", {
infoWindow: popup,
extent: initExtent,
logo: false,
wrapAround180: true
});
//map.hideZoomSlider();
dojo.connect(map, "onLoad", mapReady);
//Add the imagery layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
var landBaseLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer");
map.addLayer(landBaseLayer);
}
function mapReady(map) {
map.hideZoomSlider();
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
}
dojo.addOnLoad(init);
</script>
<div style="border-style: none solid solid solid; border-width: thin; border-color: #0099cc; width:345px; height: 281px">
<div style="width:345px; height:30px; overflow:hidden; z-index: -1; color: #FFFFFF; font-style: normal; font-family: Cambria; font-weight: bold; font-size: medium; "
title="GIS Map Control">
GIS Map Control
</div>
<div id="map" style="padding:0; width: 345px; height: 251px;position: relative; z-index:0;">
</div>
</div>
What am i missing?
... View more
09-17-2012
11:06 PM
|
0
|
2
|
1051
|
|
POST
|
Can you apply a service pack: http://support.esri.com/en/downloads/patches-servicepacks/list?productid=107&productVersions=10&categoryTypes=5 ? Otherwise, can you get enough information from: http://<your ags>/rest/services/<your service>/MapServer/<layerId>?f=json ? Not sure of applying service pack.. converting to json surely gives me enough info Thanks.. Now how do i hit this URL from Jscript?
... View more
09-06-2012
05:20 AM
|
0
|
0
|
902
|
|
POST
|
Is there a way to access the drawing info of layers.? I use a ArcGIS server Version 10.0 [ATTACH=CONFIG]17514[/ATTACH] I see only these set of properties accessable with layerinfos [--EDIT--] From the doc's i see If the layers are version 10 or lower the legend is created using the ArcGIS.com legend service. In order to use the ArcGIS.com legend service your map service needs to be publicly accessible and your application must be able to access ArcGIS.com. There is similar dependancy on Drawing Info as well i guess. (In my case map service is not publicly available)
... View more
09-06-2012
03:22 AM
|
0
|
5
|
1494
|
|
POST
|
I found some success in resolving quite a few issues Here goes the code http://jsfiddle.net/3REWd/ But still there exists issue with tracking mapPoint onclick.. I see an offset when the infoWindow appears. Any Hint to resolve this?
... View more
09-04-2012
06:33 AM
|
0
|
0
|
1442
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-24-2016 02:36 AM | |
| 1 | 08-01-2017 03:25 AM | |
| 1 | 09-16-2015 09:23 AM | |
| 1 | 03-22-2016 11:13 AM | |
| 1 | 11-24-2016 02:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-18-2023
06:35 PM
|