Find the nearest one.
'); infowindow.setContent('
' + locations[i][4] + '
' + locations[i][3] + '
Get Direction'); infowindow.open(map, marker); } })(marker, i)); }}function getlatlong(lat, lon) { window.open( 'https://maps.google.com/?q=' + lat + ',' + lon, '_blank' );} initialize(); data3 = []; fuelData = []; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function() { if(this.readyState === 4) { res = JSON.parse(this.responseText);//console.log(res);//res= this.responseText; fuelLocation = res.RO_Details; var State = []; var newLocations = []; for (i = 0; i < fuelLocation.length; i++) { if (fuelLocation[i].latitude != 0 && fuelLocation[i].longitude != 0) { var str = { "name": fuelLocation[i].Roname, "state": fuelLocation[i].State, "city": fuelLocation[i].City, "address": fuelLocation[i].Roaddress1, "lattitude": fuelLocation[i].latitude, "longitude": fuelLocation[i].longitude, "type": 1, "pincode": fuelLocation[i].Ropincode, "rocode": fuelLocation[i].Rocode, "roid": fuelLocation[i].Roid, // "Dealername": fuelLocation[i].Dealername, // "Dealerphone": fuelLocation[i].Dealerphone, "Territory": fuelLocation[i].Territory } newLocations.push(str); State.push(fuelLocation[i].State); } } data3 = newLocations; let unique = State.filter((item, i, ar) => ar.indexOf(item) === i); unique = unique.sort(); var s_html = '
'; for (i = 0; i < unique.length; i++) { s_html += '
'; } document.getElementById("stateSelect").innerHTML = s_html; //console.clear(); } }); //xhr.open("GET", "/themes/custom/jiobp/fuel-data-json/LocationAPIOutput.txt"); //xhr.open("GET", "/themes/custom/jiobp/fuel-data-json/rdata.txt");xhr.open("POST", "/locatorapi.php") xhr.send(); var fuelPriceLoc = []; /*var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function() { if(this.readyState === 4) { res = JSON.parse(this.responseText); fuelPrice = res.RODetail var fuelPriceLoc = []; for (i = 0; i < fuelPrice.length; i++) { var str = { "rocode": fuelPrice[i].ROCode, "roid": fuelPrice[i].ROID, "Product": fuelPrice[i].Product, "Price": fuelPrice[i].Price, "date": fuelPrice[i].DTStartDate } fuelPriceLoc.push(str); } fuelData = fuelPriceLoc } }); xhr.open("GET", "/themes/custom/jiobp/fuel-data-json/PriceAPIOutput.txt"); xhr.send();*/ function getCity() { d = document.getElementById("stateSelect").value; City = []; for (i = 0; i < data3.length; i++) { if(d == data3[i].state && data3[i].city != '') { City.push(data3[i].city); } } var s_html = '
'; let Cityunique = City.filter((item, i, ar) => ar.indexOf(item) === i); Cityunique = Cityunique.sort(); for (i = 0; i < Cityunique.length; i++) { s_html += '
'; } document.getElementById("citySelect").innerHTML = s_html; } //data3 = JSON.parse(data3); //fuelData = JSON.parse(fuelData); var resultBtn = document.querySelector(".show_result"); var reset_btn = document.querySelector(".reset_btn"); var form__results = document.querySelector(".form__results"); var form__inputs = document.querySelector(".form__inputs"); var stateSelect = document.querySelector("#stateSelect"); var citySelect = document.querySelector("#citySelect"); var form_locator = document.querySelector("#form_locator"); var form__resetSec = document.querySelector(".form__resetSec"); resultBtn.addEventListener("click", function () {if (citySelect.value == "" && stateSelect.value == "" && form_locator.value == "") {alert('Please select state & city or enter a pincode.');}if (citySelect.value !== "" && stateSelect.value !== "") {if (form_locator.value == "") { var data_html = '';var fuelPriceLoc = [];for(var i = 0; i < data3.length; i++) { if(stateSelect.value == data3[i].state && citySelect.value == data3[i].city) {var xhr = new XMLHttpRequest();xhr.withCredentials = true;var data = new FormData();data.append("roid", data3[i].roid);xhr.addEventListener("readystatechange", function() {if(this.readyState === 4) {res = JSON.parse(this.responseText);fuelPrice = res.RODetail;fuelResponseFlag = res.Response.ResponseFlag;if(fuelResponseFlag == 'S'){for (i = 0; i < fuelPrice.length; i++) {var str = {"rocode": fuelPrice[i].ROCode, "roid": fuelPrice[i].ROID, "DTStartDate": fuelPrice[i].DTStartDate, "Product": fuelPrice[i].Product, "Price": fuelPrice[i].Price, "date": fuelPrice[i].DTStartDate}fuelPriceLoc.push(str);}}fuelData = fuelPriceLoc;}});xhr.open("POST", "/PriceAPIOutput.php");xhr.send(data);}}setTimeout(function(){console.log(fuelData); for(var i = 0; i < data3.length; i++) { if(stateSelect.value == data3[i].state && citySelect.value == data3[i].city) { var Roname = data3[i].name; var State = data3[i].state; var City = data3[i].city; var Rocode = data3[i].rocode; var Roid = data3[i].roid; var latitude = data3[i].lattitude; var longitude = data3[i].longitude; var Roaddress1 = data3[i].address; var Type = data3[i].type; var Diesel = ''; var Petrol = ''; var LPG = '';document.getElementById('tag_state').innerHTML = State;document.getElementById('tag_city').innerHTML = City; for(var j = 0; j < fuelData.length; j++) { if(Roid == fuelData[j].roid) { if(fuelData[j].Product == 'Diesel') { Diesel = fuelData[j].Price; DTStartDate = fuelData[j].DTStartDate; } if(fuelData[j].Product == 'Petrol') { Petrol = fuelData[j].Price; DTStartDate = fuelData[j].DTStartDate; } if(fuelData[j].Product == 'Auto LPG') { LPG = fuelData[j].Price; DTStartDate = fuelData[j].DTStartDate; } } } data_html += '
'; data_html += '
' + Roname + '
'; data_html += '
'; data_html += '
RO Code: ' + Rocode + '
'; data_html += '
RO ID: ' + Roid + '
'; data_html += '
'; data_html += '
'; data_html += '
'; data_html += '
'; data_html += '
'; data_html += ''; data_html += '
'; data_html += '
'; if(LPG != '') { data_html += '
'; data_html += ''; data_html += '
' + LPG + ' Rs/LtrLast Updated on: ' + DTStartDate + '
'; data_html += '
'; } if(Diesel != '') { data_html += '
'; data_html += ''; data_html += '
' + Diesel + ' Rs/LtrLast Updated on: ' + DTStartDate + '
'; data_html += '
'; } if(Petrol != '') { data_html += '
'; data_html += ''; data_html += '
' + Petrol + ' Rs/LtrLast Updated on: ' + DTStartDate + '
'; data_html += '
'; } data_html += '
'; data_html += '
'; data_html += '
'; data_html += '
'; //data_html += '
'; data_html += '
' + Roname + '
'; data_html += '
'; data_html += '
RO Code: ' + Rocode + '
'; data_html += '
RO ID: ' + Roid + '
'; data_html += '
'; data_html += '
'; data_html += '
'; data_html += '
'; data_html += '
'; data_html += ''; data_html += '
'; data_html += '
'; if(LPG != '') { data_html += '
'; data_html += ''; data_html += '
' + LPG + ' Rs/Ltr
'; data_html += '
'; } if(Diesel != '') { data_html += '
'; data_html += ''; data_html += '
' + Diesel + ' Rs/Ltr
'; data_html += '
'; } if(Petrol != '') { data_html += '
'; data_html += ''; data_html += '
' + Petrol + ' Rs/Ltr
'; data_html += '
'; } data_html += '
'; data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '';// data_html += '
Washroom
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '';// data_html += '
Air Service
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '';// data_html += '
Lubricants
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '';// data_html += '
Drinking Water
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '';// data_html += '
Truck Stop
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '';// data_html += '
Food Plaza
';// data_html += '
';// data_html += '
';// data_html += '
';// data_html += '
'; data_html += '
'; data_html += '
'; locations.push({ "0": data3[i]['lattitude'], "1": data3[i]['longitude'], "2": data3[i]['type'], "3": data3[i]['address'], "4": data3[i]['name'] }); } } form__results.innerHTML = data_html; addMarker1(locations); locations = []; form__results.classList.remove("d-none"); form__inputs.classList.add("d-none"); form__resetSec.classList.remove("d-none");const result_card_swiper = new Swiper(".result_card_swiper", { // Optional parameters direction: "horizontal", slidesPerView: "auto", spaceBetween: 4, // Navigation arrows navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, }); } else { alert("Please enter only location or select city and state"); } } });function addMarker1(lat, lon, type, address, name, contentString) { locations.push({ "0": lat, "1": lon, "2": type, "3": address, "4": name }); if (marker && marker.setMap) { marker.setMap(null); } var infowindow = new google.maps.InfoWindow(); var icons = { 1: { icon: '/themes/custom/jiobp/assets/images/icons/map-locator-pin.svg' }, 2: { icon: '/themes/custom/jiobp/assets/images/icons/map-locator-pin.svg' }, 3: { icon: '/themes/custom/jiobp/assets/images/icons/map-locator-pin.svg' }, 4: { icon: '/themes/custom/jiobp/assets/images/icons/map-locator-pin.svg' } }; var i; for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][0], locations[i][1]), map: map, icon: icons[locations[i][2]].icon, }); markersArray.push(marker); map.setCenter(new google.maps.LatLng(locations[i][0], locations[i][1])); map.setZoom(15); google.maps.event.addListener(marker, 'click', (function (marker, i) { var lName = locations[i][4] var lAdd = locations[i][3] var lLat = locations[i][0] var lLon = locations[i][1] return function () {infowindow.setContent('
' + lName + '
' + lAdd + '
Get Direction'); //infowindow.setContent('
' + lName + '
' + lAdd + '
'); infowindow.open(map, marker); } })(marker, i)); } locations = [];} reset_btn.addEventListener("click", function () { window.location.reload(); //form__results.classList.add("d-none"); //form__inputs.classList.remove("d-none"); //form__resetSec.classList.add("d-none"); });
-
Delhi
-
Bangalore
-
Mumbai
-
Chennai
Connect with Us
Customer Care
1800-891-9023 (toll free)
Mail us at
customercare.petroleum@jiobp.com
Check Fuel Prices
Check fuel price for the day, across any Jio-bp Mobility Station.
*For RO Id, refer your last transaction bill.
SMS RSP (Space) 4 digit RO ID* to 9223030003