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/PictureMarkerSymbol"],
   
function(Map, HomeButton, PictureMarkerSymbol) { 
 
var map = new Map("map", {
  center: [24.426405, 56.962626],
  zoom: 6,
  basemap: "satellite"});
  
var home = new HomeButton({
  map: map
  }, "HomeButton");
  home.startup();
  
  dojo.connect(map, 'onLoad', function(map) {
        nodalas();
        });
        
    function nodalas() {
            
    var rigaSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_riga.png", 39, 40);
		var daugavpilsSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_daugavpils.png", 31, 32);
		var jekabpilsSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_jekabpils.png", 31, 32);
		var liepajaSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_liepaja.png", 31, 32);
		var rezekneSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_rezekne.png", 31, 32);
		var talsiSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_talsi.png", 31, 32);
		var valmieraSymbol = new esri.symbol.PictureMarkerSymbol("http://raimondsverpejs.lv/images/2015/06/lgia_valmiera.png", 31, 32);

    var lgiaTemplate = new esri.InfoTemplate("${Name}", "<i><font color='grey'>Adrese:</font></i> ${Adrese}<br /><i><font color='grey'>Kontakti:</font></i> ${Kontakti}<br /><i><font color='grey'>Klientu pieņemšanas laiki:</font></i> ${Darbs}");
			
/* Riga */
		var nodala1 = new esri.Graphic({"geometry": {"x": 24.075919,"y": 56.925736, "spatialReference": {"wkid": 4326}}, "attributes": {
			"Name": "LĢIA Rīgas nodaļa",
            "Adrese": "<br/><b>Ojāra Vācieša iela 43, Rīga, LV-1004</b>",
            "Kontakti": "<br/><b>Tel.: 28655590, <br/>Fakss: 29370505, <br/>Mob.tel.: 26458270</b>",
            "Darbs": "<br/><b>Darba dienās 9.00 - 16.00</b>"}});
			nodala1.setSymbol(rigaSymbol); nodala1.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala1);
			
/* Liepaja */
		var nodala2 = new esri.Graphic({"geometry": {"x": 21.016750,"y": 56.508916, "spatialReference": {"wkid": 4326}}, "attributes": {
            "Name": "LĢIA Liepājas nodaļa",
            "Adrese": "<br/><b>Bāriņu 13/15, Liepāja, LV-3401</b>",
            "Kontakti": "<br/><b>Telefons: 6340009, <br/>Fakss: 6340009, <br/>Mob.tel.: 29163502</b>",
			"Darbs": "<br/><b>P: 9.00 - 12.00, T: 9.00 - 12.00</b>"}});
            nodala2.setSymbol(liepajaSymbol); nodala2.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala2);
			
/* Talsi */
		var nodala3 = new esri.Graphic({"geometry": {"x": 22.593711,"y": 57.246028, "spatialReference": {"wkid": 4326}}, "attributes": {
            "Name": "LĢIA Talsu nodaļa",
            "Adrese": "<br/><b>Kalna iela 6, Talsi, LV-3201</b>",
            "Kontakti": "<br/><b>Telefons: 63224211, <br/>Mob.tel.: 26427886</b>",
            "Darbs": "<br/><b>P: 9.00 - 12.00, T: 13.00 - 16.00</b>"}});
            nodala3.setSymbol(talsiSymbol); nodala3.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala3);
			
/* Rezekne */
		var nodala4 = new esri.Graphic({"geometry": {"x": 27.343380,"y": 56.527966, "spatialReference": {"wkid": 4326}}, "attributes": {
            "Name": "LĢIA Rēzeknes nodaļa",
            "Adrese": "<br/><b>Atbrīvošanas aleja 155/1,<br />Rēzekne, LV-4601</b>",
            "Kontakti": "<br/><b>Telefons: 64605259, <br/>Fakss: 64605257, <br/>Mob.tel.: 26596999</b>",
            "Darbs": "<br/><b>P: 9.00 - 12.00, T: 9.00 - 12.00</b>"}});
            nodala4.setSymbol(rezekneSymbol); nodala4.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala4);
			
/* Daugavpils */
		var nodala5 = new esri.Graphic({"geometry": {"x": 26.518310,"y": 55.869144, "spatialReference": {"wkid": 4326}}, "attributes": {
            "Name": "LĢIA Daugavpils nodaļa", 
            "Adrese": "<br/><b>Lāšplēša 20, Daugavpils, LV-5401</b>",
            "Kontakti": "<br/><b>Telefons: 65421891, <br/>Fakss: 65421293, <br/>Mob.tel.: 26458270</b>",
            "Darbs": "<br/><b>T: 9.00 - 12.00, P: 9.00 - 12.00</b>"}});
            nodala5.setSymbol(daugavpilsSymbol); nodala5.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala5);
			
/* Jekabpils */
		var nodala6 = new esri.Graphic({"geometry": {"x": 25.864446,"y": 56.504890, "spatialReference": {"wkid": 4326}}, "attributes": {
            "Name": "LĢIA Jēkabpils nodaļa",
            "Adrese": "<br/><b>Rīgas 199, Jēkabpils, LV-5202</b>",
            "Kontakti": "<br/><b>Telefons: 65236384, <br/>Fakss: 65235957, <br/>Mob.tel.: 28655594</b>",
            "Darbs": "<br/><b>P 9.00 - 12.00, Pk 9.00 - 12.00</b>"}});
            nodala6.setSymbol(jekabpilsSymbol); nodala6.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala6);
			
/* Valmiera */
		var nodala7 = new esri.Graphic({"geometry": {"x": 25.390939,"y": 57.546372, "spatialReference": {"wkid": 4326}}, "attributes": {
            "Name": "LĢIA Valmieras nodaļa",
            "Adrese": "<br/><b>Beātes iela 49, Valmiera, LV-4201</b>",
            "Kontakti": "<br/><b>Mob.tel.: 26573186</b>",
            "Darbs": "<br/><b>P: 9.00 - 12.00, T: 13.00 - 16.00</b>"}});
            nodala7.setSymbol(valmieraSymbol); nodala7.setInfoTemplate(lgiaTemplate); map.graphics.add(nodala7);

            map.infoWindow.resize(270, 350);
        }
});
            
          
!
999px
Loading ..................

Console