|
POST
|
the parser.parse error doesnt always mean what you think it means. it can be misleading, its just what is catching the error. Unfortunately, without posting code, not much to go on. But if you are loading an html file, try running it through a validator.
... View more
10-01-2013
04:56 AM
|
0
|
0
|
2928
|
|
POST
|
still broken, am i the only one that uses the api locally?
... View more
10-01-2013
04:29 AM
|
0
|
0
|
3118
|
|
POST
|
more than likely you are creating your overview and scalebar before your map is "loaded" (ready) Try adding them to your map's onLoad event
... View more
09-30-2013
12:13 PM
|
0
|
0
|
3811
|
|
POST
|
We currently go down to level 20 with custom LODs. The constraint is really the basemap. I hope they consider adding another level
... View more
09-30-2013
12:10 PM
|
0
|
0
|
3309
|
|
POST
|
I am in the TOC camp. Primarily for the reason: As a developer, i only want to maintain one application. As a user, I want to be presented with the same interface everytime. The one off/one layer apps are annoying. Every one is different. Maintenance is a nightmare. User experience is terrible. The whole point of GIS is bringing desperate data together. That means choices. Oh, and most of all The user should decide what layers to display, not the developer. /my (not so humble) opinion
... View more
09-11-2013
08:21 AM
|
0
|
0
|
3540
|
|
POST
|
looks like the popup documentation is busted there are no events
... View more
09-04-2013
07:42 AM
|
0
|
1
|
704
|
|
POST
|
Would it be possible to rewrite the Reuseable Widget Sample in AMD style? Create a Re-usable Widget https://developers.arcgis.com/en/javascript/jstutorials/intro_custom_dijit.html
... View more
09-03-2013
08:30 AM
|
0
|
1
|
819
|
|
POST
|
have you added layers to your map before creating the overview?
... View more
09-03-2013
05:52 AM
|
0
|
0
|
2038
|
|
POST
|
your code is in legacy style (dojo.require, etc..) so you need to use dojo.connect() instead of on (which is AMD style) the onclick event is named different also
... View more
08-29-2013
06:44 AM
|
0
|
0
|
2516
|
|
POST
|
Hi GIS folks, I am really confused with the legacy code vs AMD code. Although, I switched to AMD style of coding in my application and some of the sample/example codes in the ARCGIS javascript api are still in legacy code, because of which I am struggling to run my application as most of the time i end up getting errors. can anyone recommend which style of coding should we follow with v3.6 api. Regards Ganesh AMD. legacy is deprecated at dojo 2. we are rapidly approaching that.
... View more
08-29-2013
06:37 AM
|
0
|
0
|
2711
|
|
POST
|
I know in the legend of a rest service there is a context/type indicating png. Is there anyway to get the legend icon as JPG???? Thank you. And please no canvas html5 png to jpg solutions. I have been smashing my head for two days on that already.
... View more
08-29-2013
06:29 AM
|
0
|
0
|
652
|
|
POST
|
I know you already have an answer, but I struggled with this last week and found an even easier solution, adding one line to your code
//define a variable for your function
var myFunction = function myFunction() {
alert("Do Something");
}
//make function global
lang.setObject("myFunction", myFunction);
... View more
08-26-2013
10:13 AM
|
0
|
0
|
4401
|
|
POST
|
You can pass an object to define() that defines your utility functions. Put this in common.js:
define({
getType: function(value) {
var type = "config.json";
switch (value) {
case "test":
type = "config-test.json";
break
case "landdevelopment":
type = "config-landdevelopment.json";
break
case "utilitiesinfrastructure":
type = "config-utilitiesinfrastructure.json";
break
default:
type = "config.json";
}
return type;
},
getFormattedServiceType: function(value) {
var type = "Property Locator";
var newValue = (value.replace(".json", "")).replace('config-', '');
switch (newValue) {
case "test":
type = "Test";
break
case "landdevelopment":
type = "Land Development";
break
case "utilitiesinfrastructure":
type = "Utilities Infrastructure";
break
default:
type = "Property Locator";
}
return type;
},
getAllNamedChildDijits: function(id) {
// Gather all child widgets
var w = null;
var children = null;
widgets = {};
w = dojo.query("[widgetId]", dojo.byId(id));
children = w.map(dijit.byNode);
children.forEach(function(item, idx) {
if (item.name) {
widgets[item.name] = item;
}
});
return widgets;
}
});
Put this in load-common.html in the same directory as common.js:
<!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, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="https://community.esri.com//js.arcgis.com/3.6/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%; width: 100%; margin: 0; padding: 0;
}
</style>
<script>
var dojoConfig = {
paths: {
utilities: location.pathname.replace(/\/[^/]+$/, "")
}
}
</script>
<script src="//js.arcgis.com/3.6/"></script>
<script>
var map;
require([
"esri/map",
"utilities/common",
"dojo/domReady!"
], function(
Map, common
) {
map = new Map("map", {
basemap: "streets",
center: [ 19.291, 48.343 ],
zoom: 4
});
console.log("common", common);
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
appreciate that. I can load it from my index.html as long as i path to it correctly right? also, what about defining the components properly so in the third function i can use "query" instead of "dojo.query"?
... View more
08-21-2013
10:18 AM
|
0
|
0
|
1297
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2014 08:35 AM | |
| 1 | 05-02-2012 04:56 AM | |
| 1 | 10-29-2021 07:40 AM | |
| 1 | 10-28-2021 05:26 AM | |
| 1 | 07-17-2012 08:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-01-2022
02:00 PM
|