Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgraded to 3.8 and testing new pins

  • Loading branch information...
commit 0738ee1a96b232bc67405ad47a88695c72156184 1 parent 86079af
@alaframboise alaframboise authored
Showing with 87 additions and 57 deletions.
  1. +7 −2 css/examples.css
  2. +2 −2 html/basemaps/basemap_watercolor.html
  3. +2 −2 html/basemaps/basemaps.html
  4. +2 −2 html/basemaps/basemaps_widget.html
  5. +2 −2 html/basemaps/basemaptour.html
  6. +2 −2 html/cloud/load_feature_service.html
  7. +2 −2 html/cloud/query_feature_service.html
  8. +2 −2 html/data/load_flickr_json.html
  9. +6 −4 html/directions/directions.html
  10. +2 −2 html/directions/directions_widget.html
  11. +6 −3 html/drivetime/drivetime.html
  12. +9 −7 html/geocode/geosearch.html
  13. +6 −4 html/geocode/geosearch_widget.html
  14. +6 −3 html/geocode/reversegeocode.html
  15. +6 −3 html/geolocation/geolocation.html
  16. +2 −2 html/graphics/graphics.html
  17. +2 −2 html/graphics/graphics_toolbar.html
  18. +2 −2 html/maps/autocenter.html
  19. +2 −2 html/maps/webmapbyid.html
  20. +4 −2 html/routing/routes_and_barriers.html
  21. +2 −2 html/routing/traffic.html
  22. BIN  images/BlueCircle36.png
  23. BIN  images/GreenCircle36.png
  24. BIN  images/OrangeCircle36.png
  25. BIN  images/PurpleCircle36.png
  26. BIN  images/RedCircle36.png
  27. BIN  images/YellowCircle36.png
  28. +1 −0  index.html
  29. +10 −3 js/utils.js
View
9 css/examples.css
@@ -49,7 +49,7 @@ html, body {
}
.titlearea {
- background-color: rgba(255, 112, 255, 0.17);
+ background-color: rgba(0, 112, 255, 0.17);
}
.message {
@@ -209,12 +209,17 @@ a:hover {
}
/*** Esri Pop-up ***/
+.esriPopup {
+ /*margin-left: 10px;*/
+}
+
.esriPopup, .esriPopup .contentPane {
font-size: 10px;
line-height: 12px;
- /*padding: 6px;*/ /*offsets pointer!*/
+ /*padding: 12px;*/ /*offsets pointer!*/
}
+
.esriPopup .sizer {
width: 200px;
}
View
4 html/basemaps/basemap_watercolor.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Watercolor Basemap</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/layers/WebTiledLayer",
View
4 html/basemaps/basemaps.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Basemaps</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"../../js/utils.js",
View
4 html/basemaps/basemaps_widget.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Basemaps</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/dijit/BasemapGallery",
View
4 html/basemaps/basemaptour.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Basemap Tour</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<!-- Load my JavaScript and CSS -->
<link rel="stylesheet" type="text/css" href="../../css/examples.css">
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
define("model",[],function () {
var mapLocations = init();
View
4 html/cloud/load_feature_service.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Load Feature Service</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
define("app", ["esri/map",
"esri/layers/graphics",
View
4 html/cloud/query_feature_service.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Cloud</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
define("app",["../../js/utils.js",
"esri/layers/graphics",
View
4 html/data/load_flickr_json.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Flickr JSON</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map","esri/dijit/PopupTemplate", "esri/geometry/Point", "esri/graphic", "esri/request", "../../js/utils.js", "dojo/on", "dojo/dom", "dojo/domReady!"],
function(Map, PopupTemplate, Point, Graphic, Request, utils, on, dom) {
View
10 html/directions/directions.html
@@ -5,11 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Directions</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/tasks/locator",
@@ -41,6 +41,8 @@
center: [-117, 34],
zoom: 5
});
+
+ utils.setPopup(map, "top", -1, 34);
utils.autoRecenter(map);
// Create oAuthHelper
@@ -160,9 +162,9 @@
function addPtGraphic(type,place) {
var symbol;
if (type == "Start")
- symbol = utils.createPictureSymbol("../../images/green-pin.png", 0, 10, 24);
+ symbol = utils.createPictureSymbol("../../images/GreenCircle36.png", 6, 15, 27);
else
- symbol = utils.createPictureSymbol("../../images/red-pin.png", 0, 10, 24);
+ symbol = utils.createPictureSymbol("../../images/RedCircle36.png", 6, 15, 27);
// 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
4 html/directions/directions_widget.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Directions Widget</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/dijit/Directions",
View
9 html/drivetime/drivetime.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Drive Times</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript-->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/tasks/Geoprocessor",
@@ -32,6 +32,10 @@
zoom: 12,
});
+ utils.autoRecenter(map);
+
+ var pointSymbol = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+
//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");
gp.setOutputSpatialReference(map.spatialReference); //Set the coordinate system to match the map which is Web Mercator
@@ -56,7 +60,6 @@
map.graphics.clear();
// Add point to the map based on click event which returns the evt point
- var pointSymbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 10, 24);
pointGraphic = new Graphic(ptServiceArea, pointSymbol);
map.graphics.add(pointGraphic);
View
16 html/geocode/geosearch.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Find Places</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/tasks/locator",
@@ -21,14 +21,18 @@
"dojo/domReady!"],
function(Map, Geocoder, InfoTemplate, Graphic, Multipoint, utils, on, dom) {
"use strict"
-
+
// Create map
var map = new Map("mapDiv", {
- basemap: "gray",
+ basemap: "streets",
center: [-122.69, 45.52], //long, lat
zoom: 3
});
+
utils.autoRecenter(map);
+ utils.setPopup(map, "top", -1, 34);
+
+ var sym = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
// Create geoservice
var geocodeService = new Geocoder("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
@@ -86,8 +90,6 @@
alert("Sorry, place or address not found!");
}
- var sym = utils.createPictureSymbol("../../images/blue-pin.png", 0, 0, 24);
-
// Listen for enter key
function placeInput_onKeyPress(e) {
if (e.keyCode == 13 || e.keyCode == "13") {
@@ -100,7 +102,7 @@
for (var i = 0; i < places.length; i++) {
multiPoint.addPoint(places[i].location);
}
- map.setExtent(multiPoint.getExtent().expand(2.0));
+ map.setExtent(multiPoint.getExtent().expand(1.2));
}
function clearFindGraphics() {
View
10 html/geocode/geosearch_widget.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Find Places Widget</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/dijit/Geocoder",
@@ -28,8 +28,12 @@
center: [-122.69, 45.52], //long, lat
zoom: 13
});
+
+ utils.setPopup(map, "top", -1, 34);
utils.autoRecenter(map);
+ var sym = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+
// Create widget
var geocoder = new Geocoder({
value: 'starbucks',
@@ -75,8 +79,6 @@
alert("Sorry, address or place not found.");
}
}
-
- var sym = utils.createPictureSymbol("../../images/blue-pin.png", 0, 0, 24);
function geocodeSelect(item) {
// Create and add a selected graphic with pop-up
View
9 html/geocode/reversegeocode.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" >
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Find Address</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css" />
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css" />
<link rel="stylesheet" href="../../css/examples.css" />
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/tasks/locator",
@@ -28,8 +28,12 @@
center: [-79.40, 43.65],
zoom: 13,
});
+
+ utils.setPopup(map, "top", -1, 34);
utils.autoRecenter(map);
+ var symbol = utils.createPictureSymbol("../../images/GreenCircle36.png", 6, 15, 27);
+
// Wire events
on(map, "click", onClickReverseGeocode);
on(dom.byId("btnClear"),"click",clearFindGraphics);
@@ -51,7 +55,6 @@
if (place) {
//clearFindGraphics();
// Objects for the graphic
- var symbol = utils.createPictureSymbol("../../images/orange-pin.png", 0, 10, 24);
var place,attributes,infoTemplate,pt,graphic;
// Create and add graphics with pop-ups
pt = place.location;
View
9 html/geolocation/geolocation.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Geolocation</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/InfoTemplate",
@@ -27,8 +27,12 @@
center: [-100, 53],
zoom: 3
});
+
+ utils.setPopup(map, "top", -1, 34);
utils.autoRecenter(map);
+ var symbol = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
+
// Wire events
on(dom.byId("btnGeolocation"),"click",showGeolocation);
on(dom.byId("btnClear"), "click", clearGeolocationGraphics);
@@ -46,7 +50,6 @@
// 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, 0, 24);
var attributes = {"lat":pt.y.toFixed(2),"lon":pt.x.toFixed(2)};
var infoTemplate = new InfoTemplate("My Location","Latitude: ${lat} <br/>Longitude: ${lon}");
var graphic = new Graphic(pt,symbol,attributes,infoTemplate);
View
4 html/graphics/graphics.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Graphics</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript-->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/geometry/Point",
View
4 html/graphics/graphics_toolbar.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Graphics Toolbar</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript -->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/toolbars/draw",
View
4 html/maps/autocenter.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Auto Center</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript-->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/InfoTemplate",
View
4 html/maps/webmapbyid.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Load Webmap</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript-->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map",
"esri/dijit/Scalebar",
View
6 html/routing/routes_and_barriers.html
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Multiple Routing</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript-->
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script>
@@ -43,6 +43,8 @@
zoom: 15
});
+ utils.autoRecenter(map);
+
// Create route task
routeTask = new RouteTask("http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route");
routeParams = new RouteParameters();
@@ -60,7 +62,7 @@
on(dom.byId("btnClearRoutes"), "click", clearAll);
// Create symbols
- stopSymbol = utils.createPictureSymbol("../../images/blue-pin.png", 0, 0, 24);
+ stopSymbol = utils.createPictureSymbol("../../images/BlueCircle36.png", 6, 15, 27);
barrierSymbol = utils.createPictureSymbol("../../images/red-dot-small.png", 0, 0, 16);
routeSymbols = {
"Route 1": new SimpleLineSymbol().setColor(new Color([0,0,255,0.5])).setWidth(5),
View
4 html/routing/traffic.html
@@ -5,10 +5,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Traffic</title>
- <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">
+ <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<link rel="stylesheet" href="../../css/examples.css">
<!-- Load the library references for ArcGIS API for JavaScript-->
- <script src="http://js.arcgis.com/3.7compact"></script>
+ <script src="http://js.arcgis.com/3.8compact"></script>
<script>
require(["esri/map", "esri/dijit/Legend", "esri/dijit/Scalebar", "esri/arcgis/utils", "../../js/utils.js", "dojo/on", "dojo/_base/connect", "dojo/dom", "dojo/domReady!"],
function(Map, Legend, Scalebar, esriUtils, utils, on, conn, dom) {
View
BIN  images/BlueCircle36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/GreenCircle36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/OrangeCircle36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/PurpleCircle36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/RedCircle36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/YellowCircle36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1  index.html
@@ -30,6 +30,7 @@
</style>
</head>
<body>
+ <a href="https://github.com/esri/quickstart-map-js"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<div class="container-narrow">
<div class="row-fluid lead text-center">
<h3>ArcGIS JavaScript Quickstart Mapping Examples</h3>
View
13 js/utils.js
@@ -1,9 +1,9 @@
-define(["esri/map","esri/symbols/PictureMarkerSymbol","dojo/on"],
- function(Map,PictureMarkerSymbol, on) {
+define(["esri/map","esri/symbols/PictureMarkerSymbol","esri/dijit/Popup", "dojo/dom-construct", "dojo/on", "dojo/dom"],
+ function(Map, PictureMarkerSymbol, Popup, domConstruct, on, dom) {
"use strict"
var resizeDelay = 200;
return {
- autoRecenter:function(map) {
+ autoRecenter:function(map) {
on(map, 'load', function (map) {
on(window, 'resize', map, map.resize);
});
@@ -14,6 +14,13 @@ define(["esri/map","esri/symbols/PictureMarkerSymbol","dojo/on"],
}, resizeDelay);
});
},
+ setPopup:function(map,anchorPos,xOffset,yOffset) {
+ var popup = new Popup({anchor:anchorPos, offsetX:xOffset, offsetY:yOffset}, dojo.create("div"));
+ popup.startupDijits();
+ map.infoWindow = popup;
+ //map.infoWindow.set("highlight", false);
+ popup.domNode.style.marginLeft = xOffset+"px";
+ },
createPictureSymbol:function(url, xOffset, yOffset, size) {
return new PictureMarkerSymbol(
{
Please sign in to comment.
Something went wrong with that request. Please try again.