Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated picture symbols

  • Loading branch information...
commit a39196d5263a9120ceead34f0eb968a703d9d4e6 1 parent 0738ee1
@alaframboise alaframboise authored
View
4 html/cloud/query_feature_service.html
@@ -42,9 +42,9 @@
infoTemplate: infoTemplate
});
// Setup symbols for layer
- var symbol = utils.createPictureSymbol("../../images/blue-dot-small.png", 0, 1, 12);
+ var symbol = utils.createPictureSymbol("../../images/blue-dot-small.png", 0, 6, 12, 12);
featureLayer.renderer = new SimpleRenderer(symbol);
- var selectSymbol = utils.createPictureSymbol("../../images/red-dot-small.png", 0, 1, 12);
+ var selectSymbol = utils.createPictureSymbol("../../images/red-dot-small.png", 0, 6, 12, 12);
featureLayer.setSelectionSymbol(selectSymbol);
// Add cloud layer
m.map.addLayer(featureLayer);
View
2  html/data/load_flickr_json.html
@@ -29,7 +29,7 @@
on(dom.byId("btnClear"), "click", clearGraphics);
// Get symbol
- symbol = new utils.createPictureSymbol("http://dl.dropbox.com/u/52777651/flickr.png", 0, 0, 24);
+ symbol = new utils.createPictureSymbol("http://dl.dropbox.com/u/52777651/flickr.png", 0, 12, 24, 24);
// Request to Flickr service
function loadPhotos(){
View
6 html/directions/directions.html
@@ -42,7 +42,7 @@
zoom: 5
});
- utils.setPopup(map, "top", -1, 34);
+ utils.setPopup(map, "top", -1, 26);
utils.autoRecenter(map);
// Create oAuthHelper
@@ -162,9 +162,9 @@
function addPtGraphic(type,place) {
var symbol;
if (type == "Start")
- symbol = utils.createPictureSymbol("../../images/GreenCircle36.png", 6, 15, 27);
+ symbol = utils.createPictureSymbol("../../images/green-pin.png", 0, 6, 13, 24);
else
- symbol = utils.createPictureSymbol("../../images/RedCircle36.png", 6, 15, 27);
+ symbol = utils.createPictureSymbol("../../images/RedCircle36.png", 0, 6, 13, 24);
// Add graphic to map
var attributes = { address:place.address, score:place.score, lat:place.location.y.toFixed(2), lon:place.location.x.toFixed(2) };
var infoTemplate = new InfoTemplate(type,"${address}<br/>Latitude: ${lat}<br/>Longitude: ${lon}<br/>Score: ${score}<span class='popupZoom' onclick='zoomToPlace(" + place.location.x.toFixed(2) + "," + place.location.y.toFixed(2) + ",15)';>Zoom To</span>");
View
2  html/drivetime/drivetime.html
@@ -34,7 +34,7 @@
utils.autoRecenter(map);
- var pointSymbol = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+ var pointSymbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 12, 13, 24);
//Here is the spatial analysis service that creates the drive time polygons.
gp = new Geoprocessor("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Network/ESRI_DriveTime_US/GPServer/CreateDriveTimePolygons");
View
4 html/geocode/geosearch.html
@@ -30,9 +30,9 @@
});
utils.autoRecenter(map);
- utils.setPopup(map, "top", -1, 34);
+ utils.setPopup(map, "top", -1, 26);
- var sym = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+ var sym = utils.createPictureSymbol("../../images/blue-pin.png", 0, 12, 13, 24);
// Create geoservice
var geocodeService = new Geocoder("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
View
4 html/geocode/geosearch_widget.html
@@ -29,10 +29,10 @@
zoom: 13
});
- utils.setPopup(map, "top", -1, 34);
+ utils.setPopup(map, "top", -1, 26);
utils.autoRecenter(map);
- var sym = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+ var sym = utils.createPictureSymbol("../../images/blue-pin.png", 0, 12, 13, 24);
// Create widget
var geocoder = new Geocoder({
View
6 html/geocode/reversegeocode.html
@@ -29,10 +29,10 @@
zoom: 13,
});
- utils.setPopup(map, "top", -1, 34);
+ utils.setPopup(map, "top", -1, 26);
utils.autoRecenter(map);
- var symbol = utils.createPictureSymbol("../../images/GreenCircle36.png", 6, 15, 27);
+ var symbol = utils.createPictureSymbol("../../images/green-pin.png", 0, 12, 13, 24);
// Wire events
on(map, "click", onClickReverseGeocode);
@@ -67,7 +67,7 @@
map.infoWindow.setTitle("Reverse Geocode Result");
map.infoWindow.setContent(graphic.getContent());
map.infoWindow.show(pt);
- zoomToPlace(pt.x,pt.y, 16);
+ //zoomToPlace(pt.x,pt.y, 16);
} else {
alert("Sorry, address or place not found.");
}
View
4 html/geolocation/geolocation.html
@@ -28,10 +28,10 @@
zoom: 3
});
- utils.setPopup(map, "top", -1, 34);
+ utils.setPopup(map, "top", -1, 26);
utils.autoRecenter(map);
- var symbol = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+ var symbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 12, 13, 24);
// Wire events
on(dom.byId("btnGeolocation"),"click",showGeolocation);
View
2  html/maps/autocenter.html
@@ -43,7 +43,7 @@
// Create a point
var pt = new Point(position.coords.longitude,position.coords.latitude);
// Create a symbol and pop-up template and add the graphic to the map
- var symbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 10, 24); //0, 10, 24
+ var symbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 12, 13, 24); //0, 10, 24
var attributes = {"lat":pt.y.toFixed(2),"lon":pt.x.toFixed(2)};
var infoTemplate = new InfoTemplate("My Geolocation","Latitude: ${lat} <br/>Longitude: ${lon}");
var graphic = new Graphic(pt,symbol,attributes,infoTemplate);
View
4 html/routing/routes_and_barriers.html
@@ -62,8 +62,8 @@
on(dom.byId("btnClearRoutes"), "click", clearAll);
// Create symbols
- stopSymbol = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
- barrierSymbol = utils.createPictureSymbol("../../images/red-dot-small.png", 0, 0, 16);
+ stopSymbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 12, 13, 24);
+ barrierSymbol = utils.createPictureSymbol("../../images/red-dot-small.png", 0, 0, 16, 16);
routeSymbols = {
"Route 1": new SimpleLineSymbol().setColor(new Color([0,0,255,0.5])).setWidth(5),
"Route 2": new SimpleLineSymbol().setColor(new Color([0,255,0,0.5])).setWidth(5),
View
6 js/utils.js
@@ -18,17 +18,17 @@ define(["esri/map","esri/symbols/PictureMarkerSymbol","esri/dijit/Popup", "dojo/
var popup = new Popup({anchor:anchorPos, offsetX:xOffset, offsetY:yOffset}, dojo.create("div"));
popup.startupDijits();
map.infoWindow = popup;
- //map.infoWindow.set("highlight", false);
+ map.infoWindow.set("highlight", false);
popup.domNode.style.marginLeft = xOffset+"px";
},
- createPictureSymbol:function(url, xOffset, yOffset, size) {
+ createPictureSymbol:function(url, xOffset, yOffset, xWidth, yHeight) {
return new PictureMarkerSymbol(
{
"angle": 0,
"xoffset": xOffset, "yoffset": yOffset, "type": "esriPMS",
"url": url,
"contentType": "image/png",
- "width":size, "height": size
+ "width":xWidth, "height": yHeight
});
},
setSelected:function (button) {
Please sign in to comment.
Something went wrong with that request. Please try again.