|
POST
|
I see, thanks for the additional details. I think this might be a bug.
... View more
05-25-2011
07:19 PM
|
0
|
0
|
761
|
|
POST
|
I don't know of a way to do this...I think you're stuck referring to global variables or using a closure for vars you want to access inside your function.
... View more
05-25-2011
07:16 PM
|
0
|
0
|
1251
|
|
POST
|
There might be a problem here, but why do you need to destroy and re-create the measurement widget over and over?
... View more
05-25-2011
07:01 PM
|
0
|
0
|
761
|
|
POST
|
I think that error normally corresponds to permissions issues...which is strange since you can update and delete without issue. Can you double-check that you have full permissions granted on your feature class?
... View more
05-25-2011
04:17 PM
|
0
|
0
|
1309
|
|
POST
|
Hi Chris, Thanks for posting the video, very helpful. If I have this right, your city boundary is a dynamic map service layer? I was thinking it was a graphic on your map and not an overlay. Any chance you're willing to move to using your city boundary as a graphic instead of a dynamic map service layer? To answer your question about the union method I mentioned, you need two extent geometries so you would need to create an extent from your point. Here's one method:
// point objects don't have an extent so you need to
// calculate a small value to use as padding for your point
var px = (map.extent.xmax - map.extent.xmin) / map.width
// then create an extent
var ptExtent = new esri.geometry.Extent(
pt.x - px, // xmin
pt.y - px, // ymin
pt.x + px, // xmax
pt.y + px, //ymax
map.spatialReference
);
// union the two extents
// cityExtent would be the result of
// cityGraphic.getExtent()
var newExtent = ptExtent.union(cityExtent);
map.setExtent(newExtent);
... View more
05-25-2011
12:27 PM
|
0
|
0
|
2260
|
|
POST
|
I posted an answer to your question on stack exchange: http://gis.stackexchange.com/questions/10224/how-do-i-change-a-text-box-to-a-text-area-arcgis-api-for-javascript/10229#10229
... View more
05-25-2011
08:15 AM
|
0
|
0
|
2607
|
|
POST
|
Have you seen this thread: http://forums.arcgis.com/threads/26489-AttributeInspector-stringFieldOption-has-no-effect?p=88021&viewfull=1#post88021
... View more
05-24-2011
07:53 PM
|
0
|
0
|
2607
|
|
POST
|
I would seriously consider moving to a feature layer. If you use ONDEMAND mode, only features in the current extent are fetched and drawn. This should minimize the amount of graphics on your map at any one time. You can use the same infoWindow on hover strategy you're currently using with graphics with a feature layer.
... View more
05-24-2011
01:42 PM
|
0
|
0
|
2205
|
|
POST
|
Hi Justin, No require statements necessary. The code I provided needs to go inside your init function like so: function init() {
var initExtent = new esri.geometry.Extent({"xmin":-10427539,"ymin":5592973,"xmax":-10358746,"ymax":5638836,"spatialReference":{"wkid":102100}});
map = new esri.Map("mapDiv",{extent:initExtent});
var basemapURL= "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL);
map.addLayer(basemap);
dojo.connect(map, 'onLoad', function() {
var pt = new esri.geometry.Point(-100, 40, new esri.SpatialReference({ 'wkid': 4326 }));
map.graphics.add(new esri.Graphic(
esri.geometry.geographicToWebMercator(pt), // geometry
new esri.symbol.SimpleMarkerSymbol(), // symbol
{ 'title': 'Some Title...', 'content': 'Some content...' }, // attributes
new esri.InfoTemplate('${title}', '${content}')
));
});
}
The coordinates I used are geographic (lat, long) but they're converted to Web Mercator (the coordinate system you're using) using the geographicToWebMercator function so that they'll display properly on the map. Since you're also using a custom extent when your map is created, you will probably need to zoom out to see the graphic that is added to the map (the graphic is placed somewhere in the middle of the country, I chose longitude -100 and latitude 40 for convenience). 'onLoad' refers to an event fired by the map, so, yes, it's a function built into the API. The code above listens for this event and then adds a graphic when the map is ready.
... View more
05-24-2011
09:36 AM
|
0
|
0
|
2318
|
|
POST
|
Is your city boundary geometry sent to the client? If so, you can do the following: -create an esri.geometry.Polygon from your city boundary -use polygon.contains() to test if your point is in your city boundary -if the point is in your polygon, set the map extent to the city boundary's extent -if the point is not in your polygon, create an extent from your point -union your point extent with the extent of your city boundary -set the map's extent to the unioned extent
... View more
05-23-2011
02:00 PM
|
0
|
0
|
2260
|
|
POST
|
Hi Benedikt, Quite a few questions here...in the future, I'd recommend you try to stick to a single focused question for each post and note specifically what you've tried and where you're stuck. This forum works much better when discussing narrow topics rather than how to develop an entire app. That being said, I'll try to address your questions. The only difference when using your own basemap as opposed to one from ArcGIS Online is the URL you supply to either ArcGISTiledMapServiceLayer or ArcGISDynamicMapServiceLayer. To set up your map, take a look at this sample, just swap the arcgisonline.com URL with the URL for your map service: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/map_topo.html To use your own markers, put them somewhere on your web server and then create PictureMarkerSymbols using your custom icons. The Topographic Basemap with Graphics sample shows how to create PictureMarkerSymbols. Once you have your marker symbols, you can start creating and adding graphics. To get what you've described for your info window/popup content, take a look at the Feature Layer from Feature Collection sample. It has nicely formatted popups with an embedded image. Good luck!
... View more
05-23-2011
01:53 PM
|
0
|
0
|
904
|
|
POST
|
Here's how you do it with JavaScript: -listen to the map's onLoad event -create a point object -create a graphic object using your point, create some attributes and specify an InfoTemplate -add your graphic to the map Code would be something like this: dojo.connect(map, 'onLoad', function() {
var pt = new esri.geometry.Point(-100, 40, new esri.SpatialReference({ 'wkid': 4326 }));
map.graphics.add(new esri.Graphic(
esri.geometry.geographicToWebMercator(pt), // geometry
new esri.symbol.SimpleMarkerSymbol(), // symbol
{ 'title': 'Some Title...', 'content': 'Some content...' }, // attributes
new esri.InfoTemplate('${title}', '${content}')
));
});
... View more
05-23-2011
01:34 PM
|
0
|
0
|
2318
|
|
POST
|
Glad to help. Care to elaborate on what fixed it for you?
... View more
05-19-2011
05:43 PM
|
0
|
0
|
996
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-23-2012 07:54 AM | |
| 1 | 05-28-2010 08:31 AM | |
| 1 | 11-12-2012 08:12 AM | |
| 3 | 02-23-2012 10:57 AM | |
| 1 | 06-27-2011 08:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|