Instructions for the Pocket PolyLine 2

It’s the Pocket PolyLine 2, for Google API Maps! ... now with ZoomLock!

The Pocket PolyLine 2 creates extremely precise, pre-formatted 'polyline' array-code for your Google API Maps...in mere seconds!

And clean-up of errantly-placed map markers is a snap! Just click the 'Remove Marker and Code Line' button on the upper-right of your computer screen, and the last map marker that you’ve generated on the Google API Map will be removed from the map, along with the marker’s associated stretch of red 'polyline,' and the marker’s pre-formatted 'latitude-longitude' array-code. It’s that easy!

The pre-formatted 'latitude-longitude' array-code for each marker is generated in the 'Pocket PolyLine 2 PolyPocket' that expands on the right-hand-side of your computer screen when you start adding markers to the map.

If you need to remove more than one map marker (and that includes the marker’s stretch of red 'polyline' on the map, and its pre-formatted 'latitude-longitude' array-code), keep clicking the 'Remove Marker and Code Line' button until you are satisfied with your polyline’s course.

The 'LPanel' (Location Panel) interface-box in the lower left of the Google map allows you to input the 'latitude' and 'longitude' coordinates you wish to begin your polyline array-code from. Just click the 'Change Location/Clear PolyPocket' button to initialize these 'latitude' and 'longitude' values.

After you have generated a sufficient amount of polyline array-code in your 'Pocket PolyLine 2 PolyPocket,' copy that polyline array-code and 'paste' it within the 'polylineRoute' polyline-array variable brackets found in this sample pocket_polyline_2_test_file.html test file. Here is a 'txt' file with the code from the 'pocket_polyline_2_test_file.html' file that you can copy-and-paste into your text editor, pocket_polyline_2_test_file.html.txt, and 'Save' as [ pocket_polyline_2_test_file.html ].

Once you have pasted the polyline array-code within the 'polylineRoute' polyline-array variable, click the 'Change Location/Clear PolyPocket' button to clear the polyline array-code from the 'Pocket PolyLine 2 PolyPocket'—and the Google API Map will automatically re-center at the 'latitude' and 'longitude' of the last marker that was listed in the PolyPocket. The red marker displayed in the center of the Google API Map will represent these last 'latitude-longitude' coordinates.

You can now continue adding the little yellow markers (and their associated pre-formatted 'longitude-latitude' array-code) to the Google API Map and 'Pocket PolyLine 2 PolyPocket' from where you left off.

Note-1: The HTML/PHP-code for the Pocket PolyLine 2 web page can be found here:

Pocket PolyLine 2 HTML/PHP-code. Save the file as [ pocket_polyline_2_file_code.php ].

Note-2: See the website below,

Apachefriends.org,

for details on how to set up the free 'XAMPP Apache distribution' on your computer, that will allow you to view and work with the Pocket PolyLine 2 test file on your computer.

The array-code in the 'Pocket PolyLine 2 PolyPocket' has been pre-formatted for pasting within the 'polylineRoute' polyline-array variable. And, under certain conditions, you will have to remove the last 'comma' at the end of the last array code-line that you have just copied from the 'Pocket PolyLine 2 PolyPocket' and pasted within the 'polylineRoute' polyline-array variable:

The Conditions: If you are adding array-code to an 'empty' polyline array variable, or are tacking the array-code to the end of existing array-code within the polyline-array variable, you should remove the last 'comma' at the end of the last array code-line—because some browsers will warn that a 'Script error' has occurred if the 'comma' is left at the end of the last polyline array code-line. (Be sure to add a 'comma' to the previous 'last' code-line within the polyline array—that you had removed earlier—when tacking on additional array-code, as that array code-line is no longer the 'last' array code-line in the array. The 'Google API Map' will not display on your computer screen if you forget to add that 'comma' back.)

The Exception: You should not remove the 'comma' at the end of the last array code-line if you are adding new array-code somewhere in the middle of existing array-code in the 'polylineRoute' array—that you might do, for instance, when augmenting the polyline mid-path as part of a correction you are making.

You can read about 'polylines' and about changing the 'zoom-level' on a Google API Map—in this short, easy-to-read 'W3Schools.com' Google Maps Tutorial,

W3Schools Google API Tutorial,

and in the more detailed Google Developers API Map tutorial:

Google Developers API Tutorial.

Below is a link to a 'Google API Map' that shows a completed 'polyline' path that runs along the entire length of the River Thames in the South West region of England:

'Google API Map' showing a completed polyline

Have fun creating extremely precise 'polyline' paths with the aid of the Pocket PolyLine 2!