This came as a surprise for me but gMap is quite popular among WordPress template developers. I wanted to answer here few questions I receive often on email.
If you are a template developer:
- I don’t mind anyone using gMap for any work related stuff.
- Getting paid for template that uses gMap is fine as well. If you want to say thanks, there is a paypal donate somewhere on the right.
- I’m not happy if what you include in template is outdated, broken or hardcoded in a way that user can’t customize it. Please use fresh versions if possible and attach some instructions how to change map viewport, zoom level and main marker position.
I’m quite sure that some people will ignore last point. Since this website is linked in plugin, users will eventually contact me about it. So, if you are a person that just downloaded/bought WordPress template:
- I don’t develop WP templates and I plan to keep it this way. It’s not that I don’t know how – I keep this blog running and I used to work for AIGameDev which is built on quite complex WordPress. One thing I learned is that it’s cool as long as you can manage it from admin panel. Any deeper digging into sources ends in tears.
- Most of people think they need to alter gmap.js file in order to change some setting. You don’t and what you are looking for is place where gMap is actually initialized.
- If template dev was nice, there is probably a JS file that runs all subpage specific scripts. You should be looking for
$(“[some string]”).gMap([config object]) or in short, for “.gMap” string. You want to change config object and instructions how to do it are in gmap > examples/documentation tabs.
- In case of lazy developer your JS is probably just pasted in some random place in template. Worse, it may be kept somewhere in database. If it’s in template, just broaden your search from previous point to all files in template folder. If it’s in DB please return template to seller and politely ask him to never try to code again. You’ll do him and humanity a favor.
- If you feel comfortable with wordpress you may try to replace included gMap (usually 3.1.0) with newest version. This will give you bugfixes and new features.
Please keep in mind that I can’t reply quickly to all emails. Also I usually don’t know template you have so I can’t directly help you in debugging your problem. In 90% cases your best shot is to contact template developer. Other 10% are cases where you are quite sure that you have fresh gMap, you are in control of initialization script but you are looking for solution that is not in documentation. These questions are quite interesting for me and I’m always happy to help.
Just for fun, I collected some templates that use gMap:
There is a WP plugin that you may want to use too:
There is also some Twitter Bootstrap Template running in the wild, but Bootstrap is semicolonless abomination from hell so I’m not going to link it, just to not spread this disease.