POST
|
Hi, I want to send an image of point location by email and I thought to use the Export Web Map for to get the URL of image, but when I create the Web Map as JSON, the Top Level "operationalLayers" doesn't work, anything happens no matter what I change, the point doesn't show. Somebody can help me about this.
{
"mapOptions":{
"extent":{
"xmin":-146.637095,
"ymin":-33.555195,
"xmax":166.625186,
"ymax":23.54715,
"spatialReference":{
"wkid":4326
}
},
"scale":123456789.10,
"spatialReference":{
"wkid":4326
}
},
"operationalLayers":{
"featureCollection":{
"layers":[
{
"layerDefinition":{
"geometryType":"esriGeometryPoint"
},
"featureSet":{
"features":[
{
"geometry":{
"x":-46.637096,
"y":-23.54715,
"spatialReference":{
"wkid":4326
}
},
"symbol":{
"type":"esriSMS",
"style":"esriSMSCircle",
"color":[
76,
115,
0,
255
],
"size":2000,
"outline":{
"color":[
152,
230,
0,
255
],
"width":1
}
}
}
]
}
}
]
}
},
"baseMap":{
"baseMapLayers":[
{
"url":"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
}
]
},
"exportOptions":{
"dpi":80,
"outputSize":[
800,
500
]
}
}
... View more
07-08-2013
05:04 AM
|
0
|
2
|
706
|
POST
|
Hi, I want to send an image of point location by email and I thought to use the Export Web Map for to get the URL of image, but when I create the Web Map as JSON, the Top Level "operationalLayers" doesn't work, anything happens no matter what I change, the point doesn't show. Somebody can help me about this.
{
"mapOptions":{
"extent":{
"xmin":-146.637095,
"ymin":-33.555195,
"xmax":166.625186,
"ymax":23.54715,
"spatialReference":{
"wkid":4326
}
},
"scale":123456789.10,
"spatialReference":{
"wkid":4326
}
},
"operationalLayers":{
"featureCollection":{
"layers":[
{
"layerDefinition":{
"geometryType":"esriGeometryPoint"
},
"featureSet":{
"features":[
{
"geometry":{
"x":-46.637096,
"y":-23.54715,
"spatialReference":{
"wkid":4326
}
},
"symbol":{
"type":"esriSMS",
"style":"esriSMSCircle",
"color":[
76,
115,
0,
255
],
"size":2000,
"outline":{
"color":[
152,
230,
0,
255
],
"width":1
}
}
}
]
}
}
]
}
},
"baseMap":{
"baseMapLayers":[
{
"url":"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
}
]
},
"exportOptions":{
"dpi":80,
"outputSize":[
800,
500
]
}
}
... View more
07-03-2013
10:19 AM
|
0
|
0
|
1227
|
POST
|
HI, I created two points and when I move mouse over on point, show the popup about the point. But, when I click at point, the API create a new graphic on clicked point with light blue square. My problem is when I move mouse over the same point after clicked at point, the popup is blank, because the event onMouseOver get the new graphic, not my graphic point. It's possible block the event onClick on point or the problem is mine with my script?
<!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">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css">
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script>
<style>
html, body, #mapDiv {
height:100%;
width:100%;
margin:0;
padding:0;
}
</style>
<script>
// Imports
dojo.require("esri.map");
dojo.require("esri.dijit.Popup");
var map;
var dialog;
var graphic;
var popup;
function init() {
map = new esri.Map("mapDiv", {
center: [-73.966339,40.781191],
zoom: 15,
basemap: "streets"
});
dojo.connect(map, "onLoad", load);
}
function load(){
map.graphics.clear();
addPointPopUp();
dojo.connect(map.graphics, "onMouseOver", openPopUp);
dojo.connect(map.graphics, "onMouseOut", closePopUp);
}
function openPopUp(event){
map.infoWindow.setContent(event.graphic.getContent());
map.infoWindow.setTitle(event.graphic.getTitle());
map.infoWindow.show(event.screenPoint,map.getInfoWindowAnchor(event.screenPoint));
}
function closePopUp() {
map.infoWindow.hide();
}
function addPointPopUp(){
// First Point
var point = new esri.geometry.Point(-73.966339, 40.781191);
var defaultSymbol = new esri.symbol.PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Shapes/GreenPin1LargeB.png', 55, 45);
defaultSymbol.setOffset(0, 17);
var graphic = new esri.Graphic(point, defaultSymbol);
var popupTemplate = new esri.dijit.PopupTemplate({
title: " He ",
fieldInfos: [
{fieldName: "Name: John", visible: true},
{fieldName: "Age: 18", visible:true}
]
});
graphic.setInfoTemplate(popupTemplate);
map.graphics.add(graphic);
// Second Point
point = new esri.geometry.Point(-73.977339, 40.782191);
var defaultSymbol = new esri.symbol.PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Shapes/RedPin1LargeB.png', 55, 45);
defaultSymbol.setOffset(0, 17);
graphic = new esri.Graphic(point, defaultSymbol);
popupTemplate = new esri.dijit.PopupTemplate({
title: " She ",
fieldInfos: [
{fieldName: "Name: Anne", visible: true},
{fieldName: "Age: 19", visible:true}
]
});
graphic.setInfoTemplate(popupTemplate);
map.graphics.add(graphic);
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div id="mapDiv">
</div>
</body>
</html>
... View more
06-18-2013
02:15 PM
|
0
|
1
|
2995
|
POST
|
vinaybansal thank you very much. this method was that i needed
... View more
06-03-2013
11:53 AM
|
0
|
0
|
308
|
POST
|
Hi, I didn't find nothing about how put popup on vertex of the polygon, all event are for polygon, not for vertex of the polygon. It's possible? My intention. Each vertex will have popup containing input text that will search and update an address point (vertex of the polygon) to the new address. Obs. I found a solution, but I would use the edit of polygon.
... View more
05-29-2013
11:20 AM
|
0
|
3
|
409
|
POST
|
Now everthing make a sence. I had not seen that the array contained 3 feature. The first feature with 0,0 coordinate has SpatialReference wkid: 102100 and my two points has SpatialReference wkid: 4326 (obs: by default the Point class create the spatialreferente 4326, you don't need to inform). When I get Extent class from esri.graphicsExtent, the method graphicsExtent get the first object from array and use the same spatialreference for the Extent class return. Before, I didn't understand why the spatialreferente of Extent return was 102100 and not 4326. Thus, when I put the Extent return to map.setExtent the map go to ocean. evtguy thank you very much for your patience and help. Now I can go to sleep peacefully 😃 I was searching all day long about it.
... View more
05-23-2013
01:00 PM
|
0
|
0
|
1337
|
POST
|
evtguy thanks for replay. But the Extent class return two attributes with ZERO: xmax and ymin, then when I put the Extent class in map (map.setExtent), the map goes to ocean. Look the sample
<!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">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css">
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script>
<style>
html, body, #mapDiv {
height:100%;
width:100%;
margin:0;
padding:0;
}
</style>
<script type="text/javascript">
var djConfig = { parseOnLoad: true };
</script>
<script>
dojo.require("esri.map");
var map;
function init() {
map = new esri.Map("mapDiv", {
basemap: "streets",
sliderStyle: "large"
});
dojo.connect(map, "onLoad", load);
}
function load(){
var point = new esri.geometry.Point(-73.986268, 40.735812);
var point2 = new esri.geometry.Point(-77.03756, 38.907332);
var defaultSymbol = new esri.symbol.PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Shapes/GreenPin1LargeB.png', 55, 45);
var graphic = new esri.Graphic(point, defaultSymbol);
var graphic2 = new esri.Graphic(point2, defaultSymbol);
map.graphics.add(graphic);
map.graphics.add(graphic2);
var extent = esri.graphicsExtent(map.graphics.graphics);
/*
return Extent:
xmax: 0
xmin: -77.03756
ymax: 40.735812
ymin: 0
*/
var coordenatesExtent = "Return Extent from esri.graphicsExtent(map.graphics.graphics) \n\n" +
"xmax: " + extent.xmax + " \n" +
"xmin: " + extent.xmin + " \n" +
"ymax: " + extent.ymax + " \n" +
"ymin: " + extent.ymin;
alert(coordenatesExtent);
map.setExtent(extent);
}
dojo.ready(init);
</script>
<title></title>
</head>
<body class="claro">
<div id="mapDiv">
</div>
</body>
</html>
... View more
05-23-2013
11:25 AM
|
0
|
0
|
1337
|
POST
|
Hi, i'm starting developer with API for JavaScript and i can't get Extent from array at points. I looked the documentation and the atritute graphics from MAP class is GraphicLayer, but the GraphicLayer don't have method that return Extent class. How can I get Extent from array at points? var point = new esri.geometry.Point(-46.646297, -23.545901); var point2 = new esri.geometry.Point(-46.639988, -23.548556); var defaultSymbol = new esri.symbol.PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Shapes/GreenPin1LargeB.png', 55, 45); var graphic = new esri.Graphic(point, defaultSymbol); var graphic2 = new esri.Graphic(point2, defaultSymbol); map.graphics.add(graphic); map.graphics.add(graphic2); thanks for any help obs. sorry for my english =\
... View more
05-23-2013
09:02 AM
|
0
|
4
|
2392
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|