embedding gmap4

Use this forum to ask questions about how to use this website, or to make any general comments about how it works
User avatar
Eric Peterson
Posts: 4097
Joined: May 11th, 2009, 5:39 am
Location: Oregon
Contact:

Re: embedding gmap4

Post by Eric Peterson » November 8th, 2011, 6:53 am



Ugh, so far neither .tpo or .gpx files would work so I have to convert my valid files
into .kml format and it always shows the dumb waypoint blocks in the output... :(
Last edited by Eric Peterson on November 8th, 2011, 7:09 pm, edited 1 time in total.

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: embedding gmap4

Post by Joseph Elfelt » November 8th, 2011, 7:25 am

Eric,

I bet you would like to get rid of that ugly black stuff on your map.

First, go to one of the aerial views and zoom in all the way on any part of your track.
The blue line is your track and each small box is a waypoint in your file.
Each lat,lng trackpoint in your KML file has been duplicated as an unnecessary lat,lng waypoint.
When you zoom out those waypoint box symbols merge into a wide ugly black line. Yucko.

The solution is to get rid of all those waypoints so only your track is on the map.

Simply go back to whatever software you used to create the KML file and tell it to not output a track point as a waypoint.

If you used GPSBabel to produce the KML file, then include 'points=0' in your output options.

User avatar
Eric Peterson
Posts: 4097
Joined: May 11th, 2009, 5:39 am
Location: Oregon
Contact:

Re: embedding gmap4

Post by Eric Peterson » November 8th, 2011, 7:11 pm

Got it working with actual GPX format finally, was all on my end of course :)

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: embedding gmap4

Post by Joseph Elfelt » November 8th, 2011, 7:12 pm

Excellent!

Under the hood, Gmap4 uses this GPSBabel command to convert GPX files into KML files:
gpsbabel -i gpx -f path_to_gpx_file -o kml,points=0,line_width=5,line_color=990000ff -F path_to_kml_file

This conversion step is necessary since the Google map API (Application Program Interface) does not read GPX files but does read KML files.

User avatar
geographics
Posts: 963
Joined: August 5th, 2010, 2:11 pm

Re: embedding gmap4

Post by geographics » November 8th, 2011, 7:25 pm

.
Last edited by geographics on February 23rd, 2012, 11:29 pm, edited 1 time in total.

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: embedding gmap4

Post by Joseph Elfelt » November 8th, 2011, 7:46 pm

And speaking of names....
In several forums my screen name is Jelf.
Most people that address me by that screen name fail to look at it closely and wind up calling me Jeff. :roll:

Below is a sneak peek at the current beta version of Gmap4. Switch this map to one of the aerial views and watch the labels. :D The map is produced by http://bivouac.com/default.asp which is helping to wring out my beta code by using it in production on their site. Any "topo" link on that site will launch the Gmap4 beta code.

http://www.mappingsupport.com/p/beta/gm ... 0&label=on

User avatar
geographics
Posts: 963
Joined: August 5th, 2010, 2:11 pm

Re: embedding gmap4

Post by geographics » November 8th, 2011, 8:06 pm

.
Last edited by geographics on February 23rd, 2012, 11:29 pm, edited 1 time in total.

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: embedding gmap4

Post by Joseph Elfelt » November 8th, 2011, 8:36 pm

geographics wrote:hmmm, i tried the link. in all views, such as MyTopo, Terrain, Satellite ... there are a bunch of peaks marked with circle-squares, each with a label, tooltip and infobox. the labels can be removed via the Menu, but the circle-boxes remain. what behavior were you aiming at?
Gmap4 can read a delimited text file format I invented. This file format is much easier for a person to read/write than GPX or KML files. This delimited file format also lets you build 'richer' more informative maps than those other file formats. The guy that runs the Bivouac.com site gave me a lot of feedback for how that file format should work. The map link I posted displays a delimited file that was produced by the Bivouac site.

Note that the labels are black text with a transparent background. When you switch to an aerial view, many of those labels would disappear into the black shadows. The solution was to give the labels a solid background when the map is showing one of the aerial views. The delimited file format I mentioned lets the person building that file specify two different sets of html/css for the labels and then switches back and forth between those sets depending on whether or not an aerial map view is on the screen.

Also, most of those labels are clickable and will lead to more info. The cursor changes to a pointing hand when it is over something that can be clicked.

By contrast, when you use POGM (Plain Old Google Maps) you do not get any labels and the tool tips are never clickable.

Before this beta version gets promoted to the Gmap4 production code, I need to update the docs and produce a number of example maps to demo the new features.

User avatar
geographics
Posts: 963
Joined: August 5th, 2010, 2:11 pm

Re: embedding gmap4

Post by geographics » November 8th, 2011, 8:45 pm

.
Last edited by geographics on February 23rd, 2012, 11:30 pm, edited 1 time in total.

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: embedding gmap4

Post by Joseph Elfelt » November 8th, 2011, 8:50 pm

Gracias for the kind words.
The Bivouac guy, Robin Tivy, gets a lot of credit for his good input on how the delimited files might work.

Post Reply