function initMap(){
// Create the map.
const map = new google.maps.Map(document.getElementById('storefinder67ff7f7e7fc27'), {
zoom: 6,
center: { lat: 51.9481510, lng: 10.265166 },
});
// Load the stores GeoJSON onto the map.
map.data.loadGeoJson('https://cdn02.plentymarkets.com/gi09b7ak6jlw/frontend/storeFinder/RichterListStores0325.json', {idPropertyName: 'storeid'});
const apiKey = 'AIzaSyCAzo7d0yJfTzmjOyf9PjsEHodBP9CzrFc';
const infoWindow = new google.maps.InfoWindow();
// Show the information for a store when its marker is clicked.
map.data.addListener('click', (event) => {
const name = event.feature.getProperty('name');
const street = event.feature.getProperty('street');
const plz = event.feature.getProperty('plz');
const city = event.feature.getProperty('city');
const country = event.feature.getProperty('country');
const site = event.feature.getProperty('site');
const phone = event.feature.getProperty('phone');
const mail = event.feature.getProperty('mail');
const lat = event.feature.getProperty('lat');
const lang = event.feature.getProperty('lang');
const mapsroute = "https://www.google.com/maps/place/" + lat + "," + lang;
const position = event.feature.getGeometry().get();
const blank = "_blank";
const content = "
";
infoWindow.setContent(content);
infoWindow.setPosition(position);
infoWindow.setOptions({pixelOffset: new google.maps.Size(0, -30)});
infoWindow.open(map);
});
// Build and add the search bar
const card = document.createElement('div');
const titleBar = document.createElement('div');
const title = document.createElement('div');
const container = document.createElement('div');
const input = document.createElement('input');
const options = {
fields: ["address_components", "geometry", "icon", "name"],
};
card.setAttribute('id', 'pac-card');
title.setAttribute('id', 'title');
title.textContent = 'Gib hier deinen Wohnort ein & finde die nächste Filiale';
titleBar.appendChild(title);
container.setAttribute('id', 'pac-container');
input.setAttribute('id', 'pac-input');
input.setAttribute('type', 'text');
input.setAttribute('placeholder', 'Adresse eingeben');
container.appendChild(input);
card.appendChild(titleBar);
card.appendChild(container);
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(card);
// Make the search bar into a Places Autocomplete search bar and select
// which detail fields should be returned about the place that
// the user selects from the suggestions.
const autocomplete = new google.maps.places.Autocomplete(input, options);
autocomplete.setFields(
['address_components', 'geometry', 'name']);
// Set the origin point when the user selects an address
const originMarker = new google.maps.Marker({map: map});
originMarker.setVisible(false);
let originLocation = map.getCenter();
autocomplete.addListener('place_changed', async () => {
originMarker.setVisible(false);
originLocation = map.getCenter();
const place = autocomplete.getPlace();
if (!place.geometry) {
// User entered the name of a Place that was not suggested and
// pressed the Enter key, or the Place Details request failed.
window.alert('Wir konnten leider keine Adresse für Ihre Eingabe ermitteln: \'' + place.name + '\'');
return;
}
// Recenter the map to the selected address
originLocation = place.geometry.location;
map.setCenter(originLocation);
map.setZoom(9);
originMarker.setPosition(originLocation);
originMarker.setVisible(true);
// Use the selected address as the origin to calculate distances
// to each of the store locations
const rankedStores = await calculateDistances(map.data, originLocation);
showStoresList(map.data, rankedStores);
return;
});
}
async function calculateDistances(data, origin) {
const stores = [];
const destinations = [];
// Build parallel arrays for the store IDs and destinations
data.forEach((store) => {
const storeNum = store.getProperty('storeid');
const storeLoc = store.getGeometry().get();
stores.push(storeNum);
destinations.push(storeLoc);
});
// Retrieve the distances of each store from the origin
// The returned list will be in the same order as the destinations list
const service = new google.maps.DistanceMatrixService();
const getDistanceMatrix = (service, parameters) => new Promise((resolve, reject) => {
service.getDistanceMatrix(parameters, (response, status) => {
//console.log(status);
//console.log(google.maps.DistanceMatrixStatus);
if (status != google.maps.DistanceMatrixStatus.OK) {
reject(response);
} else {
const distances = [];
const results = response.rows[0].elements;
var loopStartValue = 0;
if(loopIndex > 0 ){
loopStartValue = loopIndex * (chunkSize);
}
for (let j = 0; j < results.length; j++) {
const element = results[j];
const distanceText = element.distance.text;
const distanceVal = element.distance.value;
const distanceObject = {
storeid: stores[loopStartValue + j],
distanceText: distanceText,
distanceVal: distanceVal,
};
distances.push(distanceObject);
}
resolve(distances);
}
});
});
const chunkSize = 25;
var distancesList = [];
var loopIndex = 0;
for (let i = 0; i < destinations.length; i += chunkSize) {
const reducedDestinations = destinations.slice(i, i + chunkSize);
calcDistance = await getDistanceMatrix(service, {
origins: [origin],
destinations: reducedDestinations,
travelMode: 'DRIVING',
unitSystem: google.maps.UnitSystem.METRIC,
});
distancesList.push(...calcDistance)
loopIndex++;
}
distancesList.sort((first, second) => {
return first.distanceVal - second.distanceVal;
});
return distancesList;
}
function showStoresList(data, stores) {
if (stores.length == 0) {
return;
}
let panel = document.createElement('div');
// If the panel already exists, use it. Else, create it and add to the page.
if (document.getElementById('panel')) {
panel = document.getElementById('panel');
// If panel is already open, close it
if (panel.classList.contains('open')) {
panel.classList.remove('open');
}
} else {
panel.setAttribute('id', 'panel');
const storeFWrapper = document.getElementById('storefinder67ff7f7e7fc27');
const body = document.body;
//panel.appendTo("#storefinder67ff7f7e7fc27");
storeFWrapper.insertBefore(panel, storeFWrapper.childNodes[0]);
//body.insertBefore(panel, body.childNodes[0]);
}
// Clear the previous details
while (panel.lastChild) {
panel.removeChild(panel.lastChild);
}
var storeOutputLimit = 10;
stores.slice(0, storeOutputLimit).forEach((store) => {
const currentStore = data.getFeatureById(store.storeid);
var storeAdress = "https://www.google.com/maps/place/" + currentStore.getProperty('lat') + "," + currentStore.getProperty('lang');
// Add store details with text formatting
const name = document.createElement('p');
const adress = document.createElement('p');
const route = document.createElement('a');
route.href = storeAdress;
route.textContent = "Zur Route ›";
route.classList.add('routeLink');
route.setAttribute('target', '_blank')
name.classList.add('place');
adress.classList.add('placeAddr');
name.textContent = currentStore.getProperty('name');
panel.appendChild(name);
adress.textContent = currentStore.getProperty('street') + ", " + currentStore.getProperty('plz') + " " + currentStore.getProperty('city');
panel.appendChild(adress);
const distanceText = document.createElement('p');
distanceText.classList.add('distanceText');
distanceText.textContent = store.distanceText;
panel.appendChild(distanceText);
panel.appendChild(route);
});
// Open the panel
panel.classList.add('open');
return;
}
Anmelden
Jetzt registrieren
Hinweise zur Registrierung
Wir bieten Dir die Speicherung Deiner persönlichen Daten in einem passwortgeschützten Kundenkonto an, sodass Du bei Deinem nächsten Einkauf nicht erneut Deinen Namen und Deine Anschrift eingeben musst.
Durch die Registrierung werden Deine Adressdaten gespeichert.
Du kannst Dein Kundenkonto jederzeit löschen, melde Dich dafür bei dem Betreiber dieser Seite.
Beim nächsten Besuch benötigst Du zum Aufrufen Deiner persönlichen Daten lediglich Deine E-Mail und Dein Passwort.
Unsere Kauf- und Lieferbedingungen gelten für alle Online Bestellungen und werden bei jeder Bestellung anerkannt. Die auf www.richter.at erwähnten Preise sind Online Preise in Euro inklusive der gesetzlichen Mehrwertsteuer.
Versandkosten
Der Versandkostenanteil bei der Standardlieferung beträgt 5,99 € nach Österreich und nach Deutschland 7,99 € und wird einmalig pro Bestellung und Lieferanschrift verrechnet. Rücksendungen sind kostenlos, wenn die Retoure im Portal angemeldet, das Rücksendeetikett ausgedruckt & auf den Versandkarton geklebt wird.
Lieferländer
Derzeit liefern wir nach Österreich & Deutschland.
Lieferzeit
Die Bestellung wird nach Zahlungseingang schnellstmöglich bearbeitet & verschickt. Die Lieferung erfolgt in 4-7 Werktagen.
Versand-Dienstleister
Die Lieferung erfolgt per GLS.
Größenrechner
Berechne jetzt die richtige Größe Deiner neuen SchuheGerade bei Kinderfüßen ist es besonders wichtig, die richtige Größe zu ermitteln. Kinder spüren noch kaum, ob ein Schuh zu klein ist! Mit dem einfach zu bedienenden Größenrechner kannst Du in wenigen Schritten die richtige Schuhgröße feststellen. Ein Blatt Papier, ein Lineal und ein Stift genügen.
Größe nicht im Richter-Sortiment vorhanden
Wir empfehlen Größe 0 Diese passt optimal für die Fußlänge von 0mm bis 0mm
So klappt es am besten 👍🏼
1
2
3
1
Am besten nachmittags oder abends messen, da die Füße dann am längsten sind. Du kannst sie mit oder ohne Socken messen, jedoch beachte, wenn Du die Füße mit Socken misst, dass diese nicht zu straffgezogen sind.
2
Lege das Blatt Papier auf einen festen Untergrund an eine Wand oder einen Türstock und platziere den Fuß so, dass die Ferse die Wand oder den Türstock berührt. Pass auf das der Fuß stabil auf dem Blatt Papier steht. Dann markiere mit dem Stift, wo der längste Zeh endet. Beachte das die Stiftführung immer senkrecht zum Papier sein muss. Messe genauso den zweiten Fuß.
3
Messe dann mit dem Lineal beginnend am Blatt Ende, dort wo die Ferse endet (Wand- oder Türstockseite) bis zum Strich, dem längsten Punkt des Fußes. Gib die Millimeter Anzahl in unseren Größenrechner ein und erhalte die richtige Größe. Wenn die Füße unterschiedlich lang sind, richte Dich nach der Größe des längeren Fußes.
Warum ist es so wichtig, vor dem Schuhkauf die Kinderfüße nochmals zu messen? Erwachsene merken sofort, ob ein Schuh von der Größe her passt. Kinder haben in den ersten Lebensjahren hingegen kaum Druckempfinden und spüren daher meist nicht, ob Schuhe wirklich passen. Vor allem aber sind Kinderfüße noch weich und formbar und passen sich an den Schuh an. Daher sollte man die Kinderfüße unbedingt messen, um vor dem Schuhkauf die richtige Schuhgröße zu ermitteln.