cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <link rel="stylesheet" href="https://js.arcgis.com/3.14/esri/css/esri.css">
<script type="text/javascript">
  dojoConfig = {
    locale: "lv",
    parseOnLoad: true
  };
</script>
<script src="https://js.arcgis.com/3.14/"></script>

<body id="map">
  <div id="HomeButton"></div>
</body>
            
          
!
            
               html, body, #map {
  padding:0;
  margin:0;
  height:100%;
}

#HomeButton {
  position: absolute;
  top: 95px;
  left: 20px;
  z-index: 50;
}
            
          
!
            
              require([
  "esri/map",
  "esri/dijit/HomeButton",
  "esri/symbols/SimpleMarkerSymbol"],
   
function(Map, HomeButton, SimpleMarkerSymbol) { 
 
var map = new Map("map", {
  center: [24.02591, 56.950736],
  zoom: 12,
  basemap: "hybrid"});
  
var home = new HomeButton({
  map: map
  }, "HomeButton");
  home.startup();
  
  dojo.connect(map, 'onLoad', function(map) {
        velo();
        });
        
    function velo() {
        		
var marsruts1punkti = {"paths":[[[23.953257,56.957432],[23.953714,56.957420]],[[23.953714,56.957420],[23.953954,56.957408]],[[23.953954,56.957408],[23.953976,56.957432]],[[23.953976,56.957432],[23.954542,56.957385]],[[23.954542,56.957385],[23.955392,56.957302]],[[23.955392,56.957302],[23.955828,56.957206]],[[23.955828,56.957206],[23.956089,56.957147]],[[23.956089,56.957147],[23.956329,56.956945]],[[23.956329,56.956945],[23.956547,56.956850]],[[23.956547,56.956850],[23.956961,56.956778]],[[23.956961,56.956778],[23.957615,56.956719]],[[23.957615,56.956719],[23.958094,56.956636]],[[23.958094,56.956636],[23.958465,56.956553]],[[23.958465,56.956553],[23.958726,56.956541]],[[23.958726,56.956541],[23.959162,56.956577]],[[23.959162,56.956577],[23.959576,56.956624]],[[23.959576,56.956624],[23.960011,56.956660]],[[23.960011,56.956660],[23.960425,56.956649]],[[23.960425,56.956649],[23.960621,56.956661]],[[23.960621,56.956661],[23.960970,56.956601]],[[23.960970,56.956601],[23.961341,56.956578]],[[23.961341,56.956578],[23.961646,56.956506]],[[23.961646,56.956506],[23.961929,56.956471]],[[23.961929,56.956471],[23.962321,56.956376]],[[23.962321,56.956376],[23.962626,56.956221]],[[23.962626,56.956221],[23.962953,56.956138]],[[23.962953,56.956138],[23.963672,56.956043]],[[23.963672,56.956043],[23.964064,56.956007]],[[23.964064,56.956007],[23.964413,56.955948]],[[23.964413,56.955948],[23.964871,56.955793]],[[23.964871,56.955793],[23.965437,56.955650]],[[23.965437,56.955650],[23.966243,56.955389]],[[23.966243,56.955389],[23.966723,56.955246]],[[23.966723,56.955246],[23.966962,56.955115]],[[23.966962,56.955115],[23.967289,56.955032]],[[23.967289,56.955032],[23.967638,56.954925]],[[23.967638,56.954925],[23.967987,56.954877]],[[23.967987,56.954877],[23.968422,56.954734]],[[23.968422,56.954734],[23.968727,56.954592]],[[23.968727,56.954592],[23.968858,56.954532]],[[23.968858,56.954532],[23.969054,56.954354]],[[23.969054,56.954354],[23.969142,56.954247]],[[23.969142,56.954247],[23.969338,56.954175]],[[23.969338,56.954175],[23.969534,56.954139]],[[23.969534,56.954139],[23.969904,56.954056]],[[23.969904,56.954056],[23.970144,56.954021]],[[23.970144,56.954021],[23.970558,56.953854]],[[23.970558,56.953854],[23.971342,56.953676]],[[23.971342,56.953676],[23.971517,56.953604]],[[23.971517,56.953604],[23.971669,56.953497]],[[23.971669,56.953497],[23.972127,56.953414]],[[23.972127,56.953414],[23.976419,56.952498]],[[23.976419,56.952498],[23.980471,56.951678]],[[23.980471,56.951678],[23.983238,56.951238]],[[23.983238,56.951238],[23.984915,56.951036]],[[23.984915,56.951036],[23.987072,56.950846]],[[23.987072,56.950846],[23.990187,56.950679]],[[23.990187,56.950679],[23.993999,56.950560]],[[23.993999,56.950560],[23.996765,56.950560]],[[23.996765,56.950560],[23.997179,56.950679]],[[23.997179,56.950679],[23.997331,56.950703]],[[23.997331,56.950703],[23.998290,56.950715]],[[23.998290,56.950715],[23.998529,56.950656]],[[23.998529,56.950656],[23.998769,56.950525]],[[23.998769,56.950525],[23.998900,56.950429]],[[23.998900,56.950429],[23.999989,56.950453]],[[23.999989,56.950453],[24.002842,56.950406]],[[24.002842,56.950406],[24.009334,56.950227]],[[24.009334,56.950227],[24.014365,56.950107]],[[24.014365,56.950107],[24.017458,56.950012]],[[24.017458,56.950012],[24.018046,56.949976]],[[24.018046,56.949976],[24.020660,56.949666]],[[24.020660,56.949666],[24.022707,56.949380]],[[24.022707,56.949380],[24.023971,56.949154]],[[24.023971,56.949154],[24.024276,56.949154]],[[24.024276,56.949154],[24.025125,56.949058]],[[24.025125,56.949058],[24.025713,56.949046]],[[24.025713,56.949046],[24.031092,56.948236]],[[24.031092,56.948236],[24.031637,56.948176]],[[24.031637,56.948176],[24.033271,56.948282]],[[24.033271,56.948282],[24.034320,56.952032]],[[24.034320,56.952032],[24.039003,56.951983]],[[24.039003,56.951983],[24.039678,56.951852]],[[24.039678,56.951852],[24.041791,56.951827]],[[24.041791,56.951827],[24.044318,56.951648]],[[24.044318,56.951648],[24.045146,56.951516]],[[24.045146,56.951516],[24.046953,56.951456]],[[24.046953,56.951456],[24.051702,56.951109]],[[24.051702,56.951109],[24.054250,56.950977]],[[24.054250,56.950977],[24.057191,56.951464]],[[24.057191,56.951464],[24.059239,56.951594]],[[24.059239,56.951594],[24.063248,56.951818]],[[24.063248,56.951818],[24.063531,56.951758]],[[24.063531,56.951758],[24.063987,56.951330]],[[24.063987,56.951330],[24.064553,56.950937]],[[24.064553,56.950937],[24.065010,56.950722]],[[24.065010,56.950722],[24.067275,56.950531]],[[24.067275,56.950531],[24.068843,56.950161]],[[24.068843,56.950161],[24.070214,56.949743]],[[24.070214,56.949743],[24.071259,56.949338]],[[24.071259,56.949338],[24.071890,56.948921]],[[24.071890,56.948921],[24.072477,56.948182]],[[24.072477,56.948182],[24.074280,56.945729]],[[24.074280,56.945729],[24.076024,56.946442]],[[24.076024,56.946442],[24.077789,56.947263]],[[24.077789,56.947263],[24.079206,56.947762]],[[24.079206,56.947762],[24.081211,56.948368]],[[24.081211,56.948368],[24.083696,56.948914]],[[24.083696,56.948914],[24.087378,56.949542]],[[24.087378,56.949542],[24.091715,56.950336]],[[24.091715,56.950336],[24.096662,56.951273]],[[24.096662,56.951273],[24.104857,56.952849]],[[24.104857,56.952849],[24.105991,56.953277]],[[24.105991,56.953277],[24.107169,56.953800]],[[24.107169,56.953800],[24.106647,56.954134]],[[24.106647,56.954134],[24.106647,56.954134]],[[24.106647,56.954134],[24.106647,56.954134]],[[24.106647,56.954134]]],"spatialReference":{"wkid":4326}};

var marsruts2punkti = {"paths":[[[23.998900,56.950429],[23.999989,56.950453]],[[23.999989,56.950453],[24.002842,56.950406]],[[24.002842,56.950406],[24.009334,56.950227]],[[24.009334,56.950227],[24.014365,56.950107]],[[24.014365,56.950107],[24.017458,56.950012]],[[24.017458,56.950012],[24.018046,56.949976]],[[24.018046,56.949976],[24.020660,56.949666]],[[24.020660,56.949666],[24.022707,56.949380]],[[24.022707,56.949380],[24.023971,56.949154]],[[24.023971,56.949154],[24.024276,56.949154]],[[24.024276,56.949154],[24.025125,56.949058]],[[24.025125,56.949058],[24.025713,56.949046]],[[24.025713,56.949046],[24.031092,56.948236]],[[24.031092,56.948236],[24.031637,56.948176]],[[24.031637,56.948176],[24.033271,56.948282]],[[24.033271,56.948282]]],"spatialReference":{"wkid":4326}};
		       
var marsruts1 = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SHORTDOT, new dojo.Color([255,255,255]), 6);
var marsruts2 = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 6);
       
var rideRoute = new esri.geometry.Polyline(marsruts1punkti);       
    map.graphics.add(new esri.Graphic(rideRoute,marsruts1)); 
		
var rideRoute = new esri.geometry.Polyline(marsruts2punkti);       
    map.graphics.add(new esri.Graphic(rideRoute,marsruts2)); 
  
var remontsSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/07/remonts.png",25,25);
var startSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/07/ritenis.png",30,31);
var finishSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/07/finish.png",30,30);
        
var remonts1Point = new esri.geometry.Point( {"x": 23.998900, "y": 56.950429," spatialReference": {" wkid": 4326 } });       
var remonts2Point = new esri.geometry.Point( {"x": 24.033271, "y": 56.948282," spatialReference": {" wkid": 4326 } });
var startPoint = new esri.geometry.Point( {"x": 23.953235, "y": 56.957456," spatialReference": {" wkid": 4326 } });
var finishPoint = new esri.geometry.Point( {"x": 24.106647, "y": 56.954146," spatialReference": {" wkid": 4326 } });
        
    map.graphics.add(new esri.Graphic(remonts1Point,remontsSymbol));
    map.graphics.add(new esri.Graphic(remonts2Point,remontsSymbol));
    map.graphics.add(new esri.Graphic(startPoint,startSymbol));
    map.graphics.add(new esri.Graphic(finishPoint,finishSymbol));
       
var infoTemplate = new esri.InfoTemplate("${Name}", "Remontdarbi: ${Remontdarbi}");

var remontsStart = new esri.Graphic({"geometry":{"x":23.998900, "y": 56.950429, "spatialReference":{"wkid":4326}},
    "attributes":{"Name":"Veloceļs Imanta", "Remontdarbi":"turpinās..."}});
    remontsStart.setSymbol(remontsSymbol); remontsStart.setInfoTemplate(infoTemplate);
    map.graphics.add(remontsStart);
        
var remontsEnd = new esri.Graphic({"geometry":{"x":24.033271, "y": 56.948282, "spatialReference":{"wkid":4326}},
    "attributes":{"Name":"Veloceļs Zolitūde", "Remontdarbi":"turpinās..."}});
    remontsEnd.setSymbol(remontsSymbol); remontsEnd.setInfoTemplate(infoTemplate);
    map.graphics.add(remontsEnd);
          
    map.infoWindow.resize(200, 100);
}
});
            
          
!
999px
Loading ..................

Console