Route planing and CNG/LPG station finder
Name: CngLpgFinder
GoogleMaps Api V3
@copyright (c) 2010 Bernd Ostermann
CngLpgFinder calculates a route and shows the natural gas (CNG) or liquified petroleum gas (LPG)
filling stations
along this route with a given maximum distance to the route. The filling stations can be
restricted to the vicinity of refueling stops, whose distance from each other is the cruising
range with a full tank.
A KML- or CSV file can be generated with the gas stations found along the route
as POIs.
KML files can be displayed in Google Earth or they can be loaded to a Navi device after
being converted to a suitable format.
Generated CSV files can be loaded to Navi devices, which accept
POI data as CSV files as garmin devices.
Actually LPG refueling station in 16 and CNG station in 12 european
countries are used.
CngLpgFinder, based on the programming interface of GoogleMaps Api V3, is written
in JavaScript. Actually GoogleMaps Api V3 is supported by the following browsers:
- FireFox 3.0+
- Chrome (Windows|Mac|Linux)
- Opera 10.60+ (Windows)
- IE7.0+ (windows)
- Safari 4+ (Mac|iPhone)
- Android
It has been tested with Firefox, Chrome, Opera and Internet Explorer8.
Internet Explorer8 is very slow and hardly to use for this application.
The application can be operated locally or by request from a web server.
The downloaded file CngLpgFinder-V*. zip will be extracted to a directory and optionally
transferred to a web server.
A API key is no longer required for GoogleMaps Api V3.
The application will be launched in a browser by calling the Web address or locally
by opening one of the following files:
- CngLpgFinder-en.html: english version
- or CngLpgFinder-de.html: german version
The route is determined by:
- From: Start address
Example: Einsteinstraße 102, 81675 München, DE
- To: Final address or sequence of intermediate addresses separated by semicolon followed by
the final address
Example:
Frankfurt; Nürnberg; München, Einsteinstr. 102
- Avoid highways:
checked: avoid highways for the route
unchecked: use highways for the route
The syntax of addresses corresponds to that of GoogleMaps. A complete address consists of
street name and house number, Zip code city, country or country code. An address may be incomplete, if
it is known by GoogleMaps. Geographical latitude, longitude is accepted as an address.
Tip:
If an address is not known by GoogleMaps, then right click the point on
the map; the address and geographical latitude and longitude is shown.
Searching for gas filling stations can be done in two ways:
- stations within a corridor of a given extension along the route
- stations nearby refueling stops and within a corridor along the route.
Refueling stops follow in a distance of the driving range with a full tank.
The first stop is at start of the route.
Input:
- Corridor: maximum distance of the corridor border from the route in kms
- Range full tank: driving range with a full tank in kms
- At refuel stops:
checked: only stations in vicinity of refueling stops and within the corridor
along the route are shown.
unchecked: stations within the corridor along the route are shown.
- Selection of the gas type LPG or CNG:
LPG gas is the default. By clicking the radio button CNG the gas type is switched
to CNG gas and vice versa.
- Selection box of countries with gas stations:
Single selection by mouse click, multiple selection by <ctrl>mouse clicklick.
The station of the selected countries are loaded after the mouse cursor has left
the selection box. The number of loaded stations is shown in the field 'refueling stations'.
The following mouse actions are provided:
- Clicking an entry of the left side centers the map to the position of this stations and
zoomes in. Clicking the map returns to the former view.
- Clicking a marker on the map closes an open info window and pops up
a new info-window with name and description of this marker.
- Right clicking a point on the map shows the address and the
geographical coordinates of this point.
- Moving the mouse on the map shows the distance of the
mouse position to the route in the bottom right field (deactivated in Internet Explorer).
Clicking the button 'Print Results' at the bottom of the results side bar
opens a new window with the text of the results side bar and dependent on the browser
a dialog for printing. To show the new window the browser must be enabled for
popup windows.
A page may be generated with the gas stations being found as POI entries.
This page may be generated in KML or CSV format. It can be stored locally in a file.
A generated CSV file can be loaded to a navi device, which uses
CSV files as POI data as for example Garmin devices.
KML files can be displayed in Google Earth or after converting
to the appropriate format they can be loaded to a navi device.
Saving the generated POI page to a local file depends on the browser
- Firefox:
Menu Firefox: select 'page save as' and save the page as text file
with the extension .kml or .csv.
- Internet Explorer:
A dialog is opened for saving the page.
Save the page as a text file with the extension .txt and the default
encoding Unicode. If another extension or encoding is selected, the generated
page will not be saved
Then open the saved file with a text editor for example MS Notepad and save the file
as csv or kml file with the encoding required by your navi device. In most cases the
encoding ANSI or Western Europe (ISO) will work.
- Chrome and Opera:
Both browsers do not allow saving a page to a local file.
Select the text of the whole page and copy it to a
text editor (Notepad for example) and save it with the appropriate encoding to a file
with extension .kml or .csv.
Structure of POI data:
The POI data consists of:
- geographical length
- geographical latitude
- name
- description
The data of CSV files are separated by commata. Some navi
devices interprete only the first 3 fields of a POI. Therefore
in the generated CSV page the fields 'name' and 'description' are concatenated.
If you convert a KML file to a CSV file by using the KML/CSV converter,
the CSV file contains POIs with 4 fields. This file can be converted to
a 3 column CSV file by concatenating the columns 'name' and 'description'
in MS Excel.
Character encoding:
The generated POI page is encoded in UTF-8, in Internet Explorer in Unicode.
If your navi device does not interprete this code - special
characters as ö, ü, ä, ß are not presented correctly - then convert the file to
WesternEurope(ISO) = iso-8859-1.
GoogleMaps Api:
POI files of CNG and LPG stations:
Converter:
CngLpgFinder in the Web:
Cng/Lpg Finder as Android App:
All source code of CngLpgFinder is copyrighted by:
- @Copyright (c) 2010 Bernd Ostermann
Author: Bernd Ostermann
Contact: ostermann.bernd@arcor.de
- @copyright (c) 2007 Google Inc.: MarkerManager.js
Authors: Doug Ricket, Bjorn Brala
The information provided by CngLpgFinder may arbitrarily used. You may refer to
the web pages containing CngLpgFinder.
Using CngLpgFinder oder parts of it in a commercial environment requires the explicit
agreement of it's author.
The sources of CngLpgFinder may be used in non commercial applications.
They may be modified. In each case the origin und @copyright of the original
sources must be made clearly visible.