Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Beginning Google Maps Applications with PHP and Ajax

samzenpus posted more than 8 years ago | from the map-it-out dept.

105

Michael J. Ross writes "Just as PHP and other Web scripting languages have made it possible to create dynamic Web pages, online mapping services are making it possible to create dynamic maps that can be customized by a Web site owner, or made customizable by a site visitor. In the case of Google Maps, this is done using the built-in application programming interface (API), which is described in a new book, Beginning Google Maps Applications with PHP and Ajax: From Novice to Professional." Read on for the rest of Michael's review.

But first, a brief background: During the mid-1990s, the only generally available mapping applications were desktop programs with location data limited to major cities within the United States. Yet less than one decade later, those programs were obsolete, replaced by Web-based mapping services such as MapBlast, MapQuest, and Yahoo Maps. In early 2005, Google raised the bar, with its own Web-based mapping service that was far more attractive than the others. For countless Internet users, it was their first glimpse of the power of AJAX, a new combination of technologies that allows Web pages to be refreshed asynchronously, providing a faster user interface. But Google Maps later packed another feature, an API that allows Web developers to leverage the service's capabilities in previously unimagined ways.

The authors of Beginning Google Maps Applications with PHP and Ajax — Michael Purvis, Jeffrey Sambells, and Cameron Turner — are based in Waterloo, Ontario, Canada. The book was published in August of 2006, by Apress, under the ISBN of 1590597079. The publisher maintains a Web page devoted to the title, where visitors can find an online table of contents, a sample chapter (Chapter 3, "Interacting with the User and the Server") as a PDF file, and a link for submitting errata (none of which, as of this writing, appear to have been reported — assuming there are any). In addition, the authors have a Web site for the book, where they offer a sample chapter (Chapter 4, "Geocoding Addresses") in PDF format, links to raw data sources, and brief entries describing a variety of related topics, including geocoding services, Google Maps Mobile (GMM), Keyhole Markup Language (KML), and building your own geocoding using Perl.

The book's material is organized into 11 chapters, grouped into three parts. The fourth and final part contains the appendices. The three primary parts can roughly be thought of as presenting the beginning, intermediate, and advanced information. Part 1, "Your First Google Maps," whets the reader's appetite by showing how to easily create some simple maps (discussed below). In addition, it contains a chapter explaining how a Google Maps mashup interacts with the user as well as the server. The final chapter in this part discusses geocoding addresses. Part 2, "Beyond the Basics," explains how to work with third-party data, how to enhance the user interface, how to optimize and scale for large data sets, and finally what possible future directions Google may take with this API. Part 3, "Advanced Map Features and Methods," presents exactly that, covering such topics as creating custom controls and info windows, adding geometric shapes to maps, and getting the most out of geocoding, including how to work with postal codes.

The authors begin Part 1 ("Your First Google Maps") by introducing Google Maps with the two most simple examples possible: Keyhole Markup Language (KML) is an XML-like formatting language that allows one to specify the names, coordinates, and descriptions of one or more locations ("placemarks") in a single file. For anyone who wishes to avoid writing the code themselves, Wayfaring is a Web site that allows one to create and share custom Google Maps by point and click. Even though the introduction to KML is properly brief, instead of only stating that the sample coordinates were discovered manually, the authors should mention at least one simple way to find those coordinates (such as the "Link to this page" link in Satellite view in Google Maps). Nonetheless, it was wise of the authors to use simple examples to get the reader's feet wet as quickly as possible — especially for prospective readers who might skim through the rest of the book and become intimidated by the technical diagrams, JavaScript and PHP code, MySQL queries, XML markup, and mathematical formulas.

There is much to like about this book. The explanations are straightforward, the code is readable, the examples are relevant, and the writing style is approachable. The illustrations, all of which are in black and white, are well-chosen, and not overwhelming in number. In addition to showing the expected results of the sample code, they also provide enough visual incentive to encourage the reader to give the sample code a try, and perhaps develop it further into their own mapping applications.

The book is not too lengthy, clocking in at 384 pages according to the publisher (though, oddly, Amazon.com reports only 350 pages, even though the last page of the appendix reads "358"). The authors resisted the increasingly common temptation to pad the book with superfluous appendices. Instead there are only two. The first explains how and where to find location data, such as addresses and latitude/longitude points. The second appendix presents the details of all of the classes, methods, properties, constants and events defined within the Google Maps API. For some reason the authors mention "objects" instead of properties and events, but I was unable to find any pre-instantiated objects mentioned in that appendix., and I am not sure such are even possible in the API.

Fortunately, the weakest section of the book, its foreword, has the least impact upon the value of the book. It fails to perform the most basic functions of a foreword, such as explaining to prospective readers why they should become actual readers, as well as what the book covers, and how the authors are qualified to provide that coverage. Instead, its author mostly discusses his personal Google Maps Mania site, and even wedges in mention of his appearance on an NPR radio show, which has little to do with the book. He also lists his first five posts to his Mania site, the first of which contains a misspelling, which should have been caught by the book's editors, or at least indicated with a "[sic]." The best part of the foreword is the first few paragraphs, which provide a brief history of Google Maps and the hacking thereof.

Like most if not all of its titles, Apress helpfully starts this book with two versions of the table of contents — the first one serving as a high-level overview, and the second providing far more detail, listing not only sections but subsections. This is a nice touch, and should be employed by all technical publishers. On the other hand, this book does not have a lay-flat binding, which is a shame, as it makes it far more difficult to read the book with both hands free for keyboarding. With the introduction of lay-flat bindings years ago, it is inconceivable to me why it has not been universally adopted, particularly by technical publishers.

Overall, Beginning Google Maps Applications with PHP and Ajax is an excellent introduction to extending the power of Google Maps on the Web, and provides enough detail to both help and entice readers to build their own Google Maps mashups.

Michael J. Ross is a freelance writer, computer consultant, and the editor of the free newsletter of PristinePlanet.com."


You can purchase Beginning Google Maps Applications with PHP and Ajax: From Novice to Professional from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

cancel ×

105 comments

Sorry! There are no comments related to the filter you selected.

OH TEH NOES - TEH FORWARD SUCKS!!?!WTF (-1, Offtopic)

Anonymous Coward | more than 8 years ago | (#15995017)

Whatever shall we do?

Let me be the first to ask... (2, Insightful)

rhizome (115711) | more than 8 years ago | (#15995018)

There's a whole book for this?

Re:Let me be the first to ask... (1, Troll)

andrewman327 (635952) | more than 8 years ago | (#15995069)

I'm glad that they have a book for this. How many Google Maps mashups have you made if any? They are not as easy as you think.


In other news, the reviewer wrote the best definition of the AJAX technology:

AJAX, a new combination of technologies that allows Web pages to be refreshed asynchronously, providing a faster user interface.

Re:Let me be the first to ask... (0, Redundant)

rhizome (115711) | more than 8 years ago | (#15995159)

How many Google Maps mashups have you made if any? They are not as easy as you think.

Well aren't we aggressive today. In fact I am working on a "Where to refill your bike's water bottle in San Francisco" mashup as I type. I haven't found that I need 11 chapters to get as far as I have.

But then again, you already know how easy I think they are so I'll probably not get very far anyway, since I obviously think they're easy and I am obviously mistaken, dick.

AJAX, a new combination of technologies that allows Web pages to be refreshed asynchronously, providing a faster user interface.

This is pretty much the same as every other AJAX definition. I prefer something that touches on pages refreshing in the background, but I'm given to simpler terminology than the too-nerdy "asynchronously." YMMV.

Re:Let me be the first to ask... (-1, Flamebait)

Anonymous Coward | more than 8 years ago | (#15995232)

Uuuh, creating a Google Map "mashup" should take about an hour for a competant programmer. There are tons of examples with source code out there. Plus the mapping API changes regularly which renders this book useless. I can't imagine they sell more than 1000 of these types of books.

Re:Let me be the first to ask... (1, Interesting)

grazzy (56382) | more than 8 years ago | (#15995431)

1

And yes, it's quite easy for anyone with a education in CS I'd say. If you can read a manual you can implement google maps.

Re:Let me be the first to ask... (0, Flamebait)

bsartist (550317) | more than 8 years ago | (#15995820)

How many Google Maps mashups have you made if any?

One so far. I began with zero experience with either AJAX or the Google Maps API. I had a working map in an hour, using only the online reference material provided by Google as a guide. In another hour I had added markers with custom icons pop-up information boxes.

They are not as easy as you think.

Actually it was far, far easier than I thought. If you need a 350-page book to spoon-feed it to you in small bites, you may have chosen the wrong career path.

Re:Let me be the first to ask... (1)

PastAustin (941464) | more than 8 years ago | (#15996522)

I'm glad that they have a book for this. How many Google Maps mashups have you made if any? They are not as easy as you think.



[opinion]5. Yes they are.[/opinion]

Agreed that definition is not bad for as short as it is.
It is good that books like this are put out there for those who need that extra boost up the ladder, but for the could-be reader...Google Maps API [google.com] .

Read that and if you still can't get it, consider the book. If you have spend any time cross scripting (PHP to Javascript to Static HTML) this whole process is quite simple.

Re:Let me be the first to ask... (1)

LibertineR (591918) | more than 8 years ago | (#15996615)

I've done a couple, with only Google's docs to guide me.

Dude, they are easy. Much easier than I expected them to be.

If Google didnt charge so much for the commercial licence, there would be an explosion of these apps.

Re:Let me be the first to ask... (0)

Anonymous Coward | more than 8 years ago | (#15998281)

They are not as easy as you think.

Not to pile on here, but seriously, Google Maps integration is a piece of cake. I created a real-time flight tracking system with custom markers and vector drawing in one hour, and I integrated maps into my company's product in twenty minutes.

Re:Let me be the first to ask... (2, Insightful)

hamfactorial (857057) | more than 8 years ago | (#15995104)

According to TFR, yes! A friend of mine did a bunch of google maps API stuff to interface with his GPS system. He goes on bike rides around Arizona, saving the path he took. When he gets home, he downloads the GPS coordinates and makes a route which he can display on his webpage with google maps. I'm sure it can be used for far more advanced things. I bet he could make some really crazy stuff if he read this book.

Re:Let me be the first to ask... (0)

Anonymous Coward | more than 8 years ago | (#15995262)

Nothing against PHP, but it seems a bit of a shame to spend time writing a book on how to develop with Google Maps and not cover the relevant technologies that are most used in a professional/corporate environment (i.e., Java, J2XX). In my career, I've yet to work in a place where PHP was a serious contender (or even considered) - they're all Java shops (w/ Spring, Hibernate, Dynamo, Weblogic, Vignette, Dynamo, Vyre, et al.)

What advantage would this book provide me with?

Re:Let me be the first to ask... (0)

Anonymous Coward | more than 8 years ago | (#15995510)

...In my career, I've yet to work in a place where PHP was a serious contender (or even considered) - they're all Java shops...


Let me guess...
You're a Java programmer?

A PHP shop probably wouldn't be hiring you. That might explain the lack of PHP used where you work.

PHP appers to be somewhat popular, many sites I visit use it.

Re:Let me be the first to ask... (1)

RabidLobster (860722) | more than 8 years ago | (#15996338)

Unreliable search stats [google.com] say it's not THAT bad. But what do India have against PHP?

Re:Let me be the first to ask... (1)

drinkypoo (153816) | more than 8 years ago | (#15996483)

Tons and tons of major corporate websites are powered by PHP. Lots of other things are too; just as a random example, spreadfirefox is done with drupal, a FoSS CMS based on PHP. That doesn't mean it's the best tool for the job, but in the extremely-rapid-development arena, you don't have very many options. While it is more powerful, java+jsp is more involved than mod_perl, mod_php, ASP, et cetera, and if you want rapid development and more to the point rapid modifications after development, PHP is not a bad choice. Except that Zend is a stupid scripting language...

Re:Let me be the first to ask... (1, Insightful)

Keebler71 (520908) | more than 8 years ago | (#15995344)

There's a whole book for this?

Maybe the first 300 pages or so are simply the search results for "google maps api" [google.com]

Re:Let me be the first to ask... (3, Insightful)

zhez (906323) | more than 8 years ago | (#15995752)

Having read a copy myself, the content is centered around the most commonly asked questions on the newsgroup. It takes the common pitfalls (misunderstanding AJAX, too much data, poor navigation, need for custom controls etc) and works them into a cohesive path that guides the reader forwards.

Basic maps are indeed simple and are covered in depth in the first 3 chapters, but this book goes on to cover dealing with hundreds of thousands of data points where the plain API chokes before 200.

Sure, much of this material is available online, but it takes time to find all the bits you need and it takes time to filter out all of the uninformed "answers" and tips. For $23 (Amazon's price) having all this research and experience compiled into a single book should be a no brainer. Surely you charge more than $23/hr for web development? I do. I'm sure it's saved me at least a dozen hours in the last two weeks, so I think it's a fine investment!

If $23 is too much, they are having a contest to give away a few copies of the book in the next few weeks. Check the companion site at http://googlemapsbook.com/contest [googlemapsbook.com] if you want to try and win.

Re:Let me be the first to ask... (1)

bbtom (581232) | more than 8 years ago | (#15995550)

Apparently so. I've been meaning to put together a Google Maps mashup. My plan of action was to Just Google It. It's hardly rocket science, despite all the AJAX buzzword stuff.

Re:Let me be the first to ask... (1)

letxa2000 (215841) | more than 8 years ago | (#15995628)

There's a whole book for this?


My thoughts exactly. The Google Maps API documentation and a little Googling is about all you need. 358 pages? How in the hell did they fill up that many pages on this topic???

Re:Let me be the first to ask... (1)

downwithpeople (982809) | more than 8 years ago | (#15995661)

Would you rather the book be uncomprehensive? Building a Google Maps mashup requires a lot of previous programming knowledge, perhaps the book isn't intended for an experienced programmer. Just throwing that out here.

Re:Let me be the first to ask... (1)

letxa2000 (215841) | more than 8 years ago | (#16002034)

If you don't know PHP, you need to learn PHP first and buy a book on that topic. If you know PHP, all you need is the Google API and maybe a [i]little[/i] Googling. Again, I just don't see 358 pages of material there [i]on the topic that the book purports to be about[/i].

Re:Let me be the first to ask... (0)

Anonymous Coward | more than 8 years ago | (#15996738)

Considering the target audience, I'm not sure 380 pages is enough.

good mapping sites (3, Informative)

legoburner (702695) | more than 8 years ago | (#15995087)

So what are some of the better mashups out there? The sex offenders one [mapsexoffenders.com] and the gas prices one [mywikimap.com] are both quite cool. What other decent ones are there?

Re:good mapping sites (0)

Anonymous Coward | more than 8 years ago | (#15995651)

http://www.apartmentratings.com/ [apartmentratings.com]

Go type in a zip code. Then look near the top for "map search."

It's the only one apartment hunting site I know that uses Google Maps. Anyone care to offer alternatives?

Re:good mapping sites (1)

detour207 (838058) | more than 8 years ago | (#15995870)

Saw this one on Digg a while back, thought it was novel: http://garbagescout.com/ [garbagescout.com]

Re:good mapping sites (1)

winnabago (949419) | more than 8 years ago | (#15996101)

Although it's not a map, this [fboweb.com] is at the top of my list for mashups.

It displays slightly delayed actual flight data on a google earth sphere, with altitude. I do believe the Earth code is similar to the Maps API, with all the references to the third dimension for a GPoint that I noticed, but I'm not a programmer, so I don't know exactly.

Re:good mapping sites (1)

savio13 (995182) | more than 8 years ago | (#15996254)

This is one that a friend created: http://www.missingkidsmap.com/ [missingkidsmap.com] (and all without the help of a 300 page book)

Re:good mapping sites (1)

Gord (23773) | more than 8 years ago | (#15996272)

A bit of shamless self promotion here..

I'm working on mapix.co.uk [mapix.co.uk] at the moments. It's a project to build up a photographic map of the UK.

Still being tested and developed but have a look round.

Re:good mapping sites (1)

j1mc (912703) | more than 8 years ago | (#15996502)

I use MashMap [mashmap.com] to check movie showtimes in my area . . .

Re:good mapping sites (1)

garazy (929453) | more than 8 years ago | (#15996553)

I wrote http://globalsurfari.com/ [globalsurfari.com] which probably makes me a bit bias but I think it is good!

Re:good mapping sites (1)

SCHecklerX (229973) | more than 8 years ago | (#15996894)

http://www.gpsvisualizer.com/ [gpsvisualizer.com]

This thing works great for dumping stuff from my garmin etrex. He has options for google and several other mapping services. Way cool. Now if only he'd support kismet files natively for war driving.

Re:good mapping sites (1)

swalker48329 (998460) | more than 8 years ago | (#15996986)

This is a better sex offender mapping program... Also includes Amber Alerts, Goverment Alerts, Boil Water Orders, etc... http://www.safetyalertnetwork.org/ [safetyalertnetwork.org]

Re:good mapping sites (1)

Web Goddess (133348) | more than 8 years ago | (#15997267)

That sex offender site was totally worhtless,
unless (unlikely) there are no sex offenders
in the Bay Area.

TRY THESE SITES before you "link to them" mindlessly.

Thank you.
Renee

Re:good mapping sites (0)

Anonymous Coward | more than 8 years ago | (#15997603)

It works for me, I was able to pull up sex offenders in the Bay Area, you may have mindlessly done something wrong.

WHO cares ? (4, Insightful)

unity100 (970058) | more than 8 years ago | (#15995117)

There are very small number of people and businesses who are able to put forward such capitals that might dwell on ajax apps, and dependencies on third party sources like google and try to establish a youtubeish, or some other service. (youtube is given as an example to imply a big operation)

Almost 80% of the web development market is comprised of small businesses or individual investors, who do not care the slightest for ajax widgets, mumbo jumbo or the such when they start an online presence. Their problem is, selling their wares, or services via a secure, easy and clock-like working site.

Much hype was done around this ajax, yet we as web developers still are not seeing any demands on ajax stuff in contracts. And the ones that there are negligible when proportioned to the whole.

Im increasingly starting to see this ajax thing as a new "techno trend" that is pumped up and put forth by genius-tech-wizz kids (net celebrities) who did big business with similar things in the past.

The catch is, market does not need it.

Re:WHO cares ? (0)

Anonymous Coward | more than 8 years ago | (#15995235)

For the front-end, that might be true. For for the back-end, I see tremendous potential for AJAX. It enables the admin of the site to have much beter control over what is displayed, by providing more interactive controls for the content.

Also remember that you should be figuring out good applications, and letting your customers know about it. Just because they haven't requested something doesn't mean they know about it and have ruled it out. They probably often don't even know the potential.

Yes, endless widgets are a waste of budget. But there's some very useful functionality from AJAX, that once embedeed in re-usable, modular code, will offer much more power and versatility than the old methods.

Re:WHO cares ? (1)

unity100 (970058) | more than 8 years ago | (#15995517)

The problem is, the contract owner requests so extravagant and absurd changes to the software in new contracts for developing the previously produced work that ajax is prone to become a major factor in hampering the new changes. As you know, until they are explained in detail, the contract owners are, naturally being unaware of the software nature, can request a simple looking change and be totally unaware of what massive work it would require.

Re:WHO cares ? (3, Informative)

truthsearch (249536) | more than 8 years ago | (#15995244)

My company is getting a lot of requests for AJAX or similar features, especially as it relates to letting users customize a page design by dragging around components. AJAX itself is never an exact requirement, but we are often getting asked to add features which require some robust javascript.

Re:WHO cares ? (1)

Dragonslicer (991472) | more than 8 years ago | (#15995348)

Except that dragging around components is neither asynchronous nor related to XML.

Re:WHO cares ? (1)

truthsearch (249536) | more than 8 years ago | (#15995478)

It is when it needs to immediately store the changes on the server.

Re:WHO cares ? (1)

RetroGeek (206522) | more than 8 years ago | (#15995743)

Except that dragging around components is neither asynchronous nor related to XML.


Once the user releases the mouse, Ajax sends the new location info back to the server, which persists it. And the info can be sent back in an XML document, though any defined data format could be used.

Re:WHO cares ? (0)

Anonymous Coward | more than 8 years ago | (#15995303)

The catch is, market does not need it.

I hope you're right. Whenever I've mentioned (in passing) that I browse with javascript disabled and without flash, my position has been attacked en-masse.

Re:WHO cares ? (1)

unity100 (970058) | more than 8 years ago | (#15995532)

Many anti-virus, firewall and privacy software create problems with javascripts and activex anyways.

It is much better to altogether let go of javascript and activex.

Re:WHO cares ? (1)

GeckoX (259575) | more than 8 years ago | (#15999409)

Do you still run Windows 3.1 on a 486?

Do you still drive a ford Pinto?

And of course, well designed web applications will degrade gracefully, just for you few stragglers that refuse to allow the internet to be anything more than a text reader. Well, actually, not for you. But for the few that have _legitimate_ reasons.

BTW, low bandwidth is NOT a good reason to diss things like AJAX. Case in point, I recently upgraded one of our core web features that almost all of our low bandwidth customers were having problems with to use ajax instead of the standard postback. Lo and behold, this particular feature now works snappily and happily over very low bandwidth connections. BECAUSE of using javascript thank you very much.

If we keep buying into attitudes like yours, we'll be artificially crippling the potential of online applications. Please stop. Of course, overuse of flash and the like is not the way to go either, but there is a TON of room for innovation and improvement simply using tech that exists RIGHT NOW.

Re:WHO cares ? (1)

unity100 (970058) | more than 8 years ago | (#16001229)

Already security software, including anti-virus, firewalls, privacy software are blocking and creating problems for many java applications and activex procedures.

Leaving that aside, you are wrong in your point. Bandwidth is now much more important than it has ever been, because of the disgusting laws that the at&t and other telcos are pushing.

Re:WHO cares ? (1)

GeckoX (259575) | more than 8 years ago | (#16001392)

java and activex yes, that's a different conversation entirely.

As for bandwidth, I was stating that proper use of AJAX can REDUCE bandwidth useage, sheesh.

Re:WHO cares ? (1)

Moofie (22272) | more than 8 years ago | (#15995373)

"The catch is, market does not need it."

Because you are the arbiter of what the market does, or does not, need. I wish to subscribe to your newsletter.

Re:WHO cares ? (4, Insightful)

Mateo_LeFou (859634) | more than 8 years ago | (#15995921)

I think you'll see Tons of requests for AJAX as it continues to soak in. I just did a draft page for a new client. Front page had three links -- two of these used AJAX and the other used ye olde http redirect. Took all of 5 seconds for client to say "you'll fix that one so it works like the others, right?"

Re:WHO cares ? (3, Insightful)

cyngus (753668) | more than 8 years ago | (#15996054)

If you think that AJAX is just some catch-phrase or piece of eye canding, then I think you misunderstand a lot of human interface principals. The Click-Submit-Reload pattern that is required without something like AJAX is very disruptive to the user experience. AJAX can eliminate this cycle to produce a much more fluid experience. AJAX can be over-used or used badly, but when used correctly, is much more than just some cool toy.

I do. (2, Interesting)

hey! (33014) | more than 8 years ago | (#15996097)

You're just working on the wrong kinds of apps, apps where "AJAX" is just a parlor trick to show that you're a really hip developer.

There are many applications that are just fine as "web applications". Blogs for example. Most shopping cart type applications. There may be an occasional place where sprinkling a bit of ajax fairy dust makes the application a bit nicer (altough often less nice if you are vision impaired).

There are other applications that suck as "web applications". They are now what we used to think of as "web applications"; they're just applications, but they would benefit from the scalability and maintenance advantages of web based distribution.

Map-centric applications are a good example of the latter. Your basic address to map translation, like the ancient versions of mapquest, is ok as a "web" application. But there's a lot more things you'd want to do that really suck in the round trip request/response model. Typical kinds of things: draw a box on the map and find all of the Xs (where examples of X include parking garages, burger kings, whatever) fall inside that box. Or click on a map feature and get a picture or information on it.

If you go down this interactivity path far enough, then to make a standards compliant, non-sucky implementation, you have to (1) do DOM manipulations via javascript, (2) perform asynchronous remote requests to a server. Pretty much AJAX, although not necessarily with the XML component. And people working on this problem have been doing just that, predating AJAX by several years I might add. What AJAX does is give a buzzword around which common tools to do these tasks can accrete. Which is a good thing.

We've had an open standard for years now on deliverying maps via the web: Open GIS's WMS standard. The thing is, it has no user interface component. Which from an engineering standpoint is correct, although it's hell from an adoption standpoint. You end up cobbling together too much of the application: user interface widgets, client and server side communication infrastructure. New map UI javascript libraries are taking this off your hands these days. AJAX of course is generating new communication libraries and more importantly developer expertise.

Put this all together and it means that the client end of a WMS based Internet mapping application is easier than ever. And there are terrific free WMS servers as well, notably geoserver, which has both WMS and transactional WFS (which means you can update your Internet maps from any modern GIS program or even a browser client).

But now we have Google Maps to consider.

Personally, I'd much prefer people adopt, and get behind, WMS than Google Maps, although there's always a apples-vs-oranges aspect to these kinds of decisions. WMS is an open standard, which can be used with a variety of closed and open source software. You can create a public service that can immediately be shown in your GIS system, or in NASA World Wind, or in anybody's web page becuase it IS a standard. If you are creating a client, your client can use YOUR data, or any number of public map data sources such as JPL.... not just Google. You can access WMS data from non-browser clients; I recently integrated WMS mapping in a legacy application. The only way to bring Internet based map distribution to legacy apps using Google's API would be to create a map site which is registered with Google, then use ActiveX to embed a MSIE control in the user interface.

The one thing that Google Maps does that you really might need that is hard to duplicate with WMS is scalability. Google's one killer advantage is massive storage and bandwidth. If you are FedEx and want to provide every customer with a map/sat photo of where his package is, then Google Maps is probably the only way to do it.

But aside from that, go with WMS.

Re:I do. (1)

unity100 (970058) | more than 8 years ago | (#15998948)

That is indeed my point - there are very small amount of investors who can even think of entering enterprises that would use or need GIS systems, or NASA World Wind or the like.

Considering it is the small to medium businesses, and individuals who are fueling the internet in its majority, and very big companies like google, aol or the like having their own development teams, that only leaves a small fraction of medium to big capita to ever think of sailing such seas, and natually a fraction of it would be interested in doing stuff like you describe, as many others would go for many different sorts of online enterprises.

That, im saying, is a niche thing for a niche market.

Re:I do. (1)

hey! (33014) | more than 8 years ago | (#15999346)

That is indeed my point - there are very small amount of investors who can even think of entering enterprises that would use or need GIS systems, or NASA World Wind or the like

World Wind is a bad example. Ironically, the standard "store finder" application for your large company doesn't really require GIS either.

But, there are actually a large number of organizations ranging from small to large that can use geographic applications. They are, as you say, a niche, but that doesn't mean that the niche is small. If you had the skills and the contacts, you could easily work all the time on geographic apps.

I also think that many sites that use flash (a misued technology I know) could use AJAX instead.

Re:I do. (1)

unity100 (970058) | more than 8 years ago | (#15999431)

Well, thats another issue - there are many businesses that can make use of geographical solutions, but the are unaware of it. In fact, there are many technologies that many businesses can use, but all are unaware of them too.

The catch is, most will continue to be unaware, and noone is going to make a campaign to make them aware, and many of the ones that became unaware could be uninterested.

Re:I do. (1)

hey! (33014) | more than 8 years ago | (#16000294)


The catch is, most will continue to be unaware, and noone is going to make a campaign to make them aware, and many of the ones that became unaware could be uninterested.


OT, but did you go to the same school as Don Rumsfeld ;-)

Re:WHO cares ? (2, Interesting)

GeckoX (259575) | more than 8 years ago | (#15997276)

Speak for yourself. There are a couple ways to tackle this obviously highly biased diatribe that has very little basis in reality.

On the one side is the financial take. Assuming your numbers are correct, how much money is behind the 20% of 'big business' sites do you think?

Are you truly suggesting that rich web applications are something that doesn't make these companies money?

Is it impossible for widgets and templates to be wrapped up in a nice customizable package and sold to smaller businesses for very affordable rates?

Wait a sec, I'm stopping there though I could go on and on and on. (I DO apply these techs in ways that are not only beneficial, but arguably entirely depended upon, and they are used by small public organizations thank you very much!)

Your post is at the very top of this thread, modded +5, and it basically attempts to invalidate things like google maps, gmail, and other 'new techno trend' applications...Here, on Slashdot.

I have to say, wtf?

Man for mod points, that does NOT deserve +5 by any stretch of the imagination.

Re:WHO cares ? (1)

unity100 (970058) | more than 8 years ago | (#15998962)

There are very small amount of investors who can even think of entering enterprises that would use or need GIS systems, or NASA World Wind or the like. Considering it is the small to medium businesses, and individuals who are fueling the internet in its majority, and very big companies like google, aol or the like having their own development teams, that only leaves a small fraction of medium to big capita to ever think of sailing such seas, and natually a fraction of it would be interested in doing stuff like you describe, as many others would go for many different sorts of online enterprises. That, im saying, is a niche thing for a niche market.

Microsoft Virtual Earth is better (0)

Anonymous Coward | more than 8 years ago | (#15995131)

Microsofts Virtual Earth API is much better than Google's. As an example, Microsoft's API allows you to obtain driving directions, Google's API does not. Google is "considering it".

Also, on the client side, I believe that Microsoft's birdseye view at local.live.com is amazing. As an added bonus Microsoft provides live traffic data with their maps (Google doesn't). Also there is a Microsoft Virtual Earth client for the PocketPC, which includes source (http://www.viavirtualearth.com/vve/Gallery/VEMobi le.ashx).

I think Microsoft was behind but caught up and passed Google very quickly on this.

Re:Microsoft Virtual Earth is better (1)

Millenniumman (924859) | more than 8 years ago | (#15997586)

Virtual Earth isn't as nice to use as Google Maps, and certainly Google Earth. The birds eye view is excellent, but it's just pictures, not an interactive globe.

Google Geocode API inaccurate. (4, Informative)

Frosty Piss (770223) | more than 8 years ago | (#15995158)

The main problem I have with the Google Maps API is that the dataset that they let non-paying users use for Geocoding (extracting the Lat/Lon from an address) is not accurate. Yahoo provides Geocoding with much much better accuracy. So, if you need accurate Lat / Lon data, you'll have to fold both mapping technologies into your app (get the lat / lon of an address from Yahoo, plot on a map with Google. Or just use Yahoo and skip Google).

Re:Google Geocode API inaccurate. (1)

mikepurvis (998408) | more than 8 years ago | (#15995233)

Actually, keep an eye on the book's blog; in the coming weeks, we'll be publishing a tool to help you compare the various free geocoders.

Re:Google Geocode API inaccurate. (1)

SirStanley (95545) | more than 8 years ago | (#15995243)

Or... You could download the Tiger/Lines Data from the Government and do it yourself with Perl then feed the long/lat to Google instead of using their geocoding API. Just the maps!

http://search.cpan.org/~sderle/Geo-Coder-US-1.00/U S.pm [cpan.org]

It rocks. I've been using it with my voter lists for Door to door.

Re:Google Geocode API inaccurate. (1)

elyobelyob (844203) | more than 8 years ago | (#15995325)

Not everyone is in the US. Although I do need to geo-code US addresses, my main area is Europe. So, your answer id far from definitive.

Re:Google Geocode API inaccurate. (1)

Moofie (22272) | more than 8 years ago | (#15995394)

Well, maybe you should ask your own government for the same data, then.

An idea need not be "definitive" in order to be useful for, say, 250 million Americans.

Re:Google Geocode API inaccurate. (1)

elyobelyob (844203) | more than 8 years ago | (#15995717)

We have asked, Tim Berners-Lee has asked. They haven't as yet. Also, there isn't a "Government of Europe" as such, and I don't think my asking each and every government would be useful. Currently my government make quite a lot of money from licencing the information to corporations. Definitive - "Authoritative and complete". Your answer is still not definitive, as not every single one of those 250 million Merkins is contained to the boundaries of the US. Google's geocoder is a better solution than me rewriting and sourcing up-to-date data.

Re:Google Geocode API inaccurate. (1)

Moofie (22272) | more than 8 years ago | (#15996039)

So, in other words, your needs and requirements differ from other peoples' needs and requirements, and you've selected a solution that fits your needs and requirements, and other people have selected a different solution.

At which point did it become necessary to pick on people who use a solution that happens to be nation-specific? Or were you just being a dick?

Re:Google Geocode API inaccurate. (1)

elyobelyob (844203) | more than 8 years ago | (#15996256)

The discussion is about geocoding in general, not just the view of an American who doesn't have any care or wish to do anything outside his/her own boundaries. My point is that downloading the US files is not enough for plenty of people, so solutions such as Yahoo's or Google's are the best way for many people who have, until now, had no real solution to use.
I wasn't picking on anyone, and it's really not neccesary to start being a neandrathral just because you are getting all patriotic.

Re:Google Geocode API inaccurate. (1)

Moofie (22272) | more than 8 years ago | (#15996354)

"not just the view of an American who doesn't have any care or wish to do anything outside his/her own boundaries"

An American (or a Bolivian or a Lower Slobovian) doesn't NEED to care or wish to do anything outside their own boundaries. Everybody is responsible to take care of their own problems. This person (who we can assume is an American, if we're going to start making assumptions) shared a solution that works for him, and perhaps for some other people, and felt the desire to share it. You're the one who brought your inferiority complex to the table.

Just because it's not helpful to you doesn't mean it's not helpful to other people. My alleged "patriotism" notwithstanding, you're being a prick.

Re:Google Geocode API inaccurate. (1)

elyobelyob (844203) | more than 8 years ago | (#15997273)

I only said it wasn't a definitive answer. Sure, it can help and I wasn't knocking the idea, just offering my opinion that Google et al are working on a more definitive solution that is free and is managed by them. This should be ideal, and no need to grab the US Govt files. Of course, feel free to reinvent the wheel.
And, grow up, discussions don't all have to end with calling people names.

Re:Google Geocode API inaccurate. (1)

Moofie (22272) | more than 8 years ago | (#15997332)

Did anybody allege that it WAS a definitive answer?

ALL discussions don't have to end with calling people names. This one did, however. Prick.

Read the writing on the wall (0)

Anonymous Coward | more than 8 years ago | (#15996144)

Nobody cares about Euroscum like you.

Re:Read the writing on the wall (1)

elyobelyob (844203) | more than 8 years ago | (#15996193)

School's not back then?

Re:Google Geocode API inaccurate. (1)

Frosty Piss (770223) | more than 8 years ago | (#15996017)

Tiger/Lines Data is notoriously inaccurate.

Re:Google Geocode API inaccurate. (1)

rk (6314) | more than 8 years ago | (#15995483)

I've had good luck with Yahoo's geocoding services. At the time I mucked with this stuff, Google had not yet put up their geocoding service.

The big problem I have with Google maps is the API uses TeleAtlas in my area which is verging on 10 years out of date, but going to maps.google.com, my area is using NAVTEQ data, which is fairly current. It's possibly a licensing issue, but it's damned annoying to have whole major highways missing in my app.

Your mileage, of course, may vary.

Re:Google Geocode API inaccurate. (1)

eric_brissette (778634) | more than 8 years ago | (#15995669)

I'm also a little dissapointed in the lack of NAVTEQ data for the API users. I've had to switch my project to use Microsoft's service because of the outdated TeleAtlas data. It's really too bad, becasue I prefer Google's API.

Re:Google Geocode API inaccurate. (1)

dotdash (944083) | more than 8 years ago | (#15995707)

A toolset I have developed to automate some aspects of mash-up development uses the Yahoo geo-coding web-service API, but displays mash-ups using the Google Maps API. The combination works rather well. (An overview of the toolset is available at http://sparce.cs.pdx.edu/mash-o-matic/ [pdx.edu] .) Ontok has published a comparison of geo-coders (somewhat stale by now) http://www.ontok.com/geocode/compare/ [ontok.com] .

Normalize everything. (0, Offtopic)

rice_burners_suck (243660) | more than 8 years ago | (#15995253)

One of these days, it will be a good idea if the FOSS community gets together with some trend-setting companies, and invents a single language for the web. Instead of combining many different things that were invented for many different purposes, it would be a purpose-built language that will provide all the the client-side interactivity that users expect and all the server-side operations that content providers need to supply. Whether it's the AJAX-style interactivity you seek or the Flash-style content, the web is expected to do much more than the mess of languages that implement it are capable of without some 1337 h4x0ring.

Re:Normalize everything. (1)

Moofie (22272) | more than 8 years ago | (#15995418)

Why?

Ooh! (1)

Greyfox (87712) | more than 8 years ago | (#15995499)

You heard the man! Let's get cracking on WebForth immediately! Imagine... all the interactive capabilities of the web combined with the ease of programming of Forth! What could be better?

Re:Normalize everything. (1)

alain_f (941310) | more than 8 years ago | (#15996128)

There are some ongoing efforts in the research community around such unifying languages for the web, such as Links: http://groups.inf.ed.ac.uk/links/ [ed.ac.uk]

A bit early for a book? (4, Insightful)

elyobelyob (844203) | more than 8 years ago | (#15995378)

Google maps API is still very much in development with new features coming out all the time. When they switched from v1 to v2, there was a lot of converting to be done to make maps work correctly. This book will be out of date in no time. Can't see the need for it when you have an active mailing list and sites such as mapki available.

Re:A bit early for a book? (2, Informative)

zhez (906323) | more than 8 years ago | (#15995787)

It's true there are new features all of the time, but with version 2 of the API Google has stabilized the core of the system. Moreover, the authors acknowledge this "moving target" and have set up a dedicated site to act as an ongoing companion. If what I've seen so far is any indication they are dedicated to keeping all their readers up to date.

http://googlemapsbook.com/ [googlemapsbook.com] if you're interested.

Re:A bit early for a book? (1)

elyobelyob (844203) | more than 8 years ago | (#15995919)

Their sample document is already out of date! No mention of "accuracy" returns in geocoding. It's not really a case of the book not being required, but more of the fact it'll be out of date too quickly. If I have to rely on a website to keep me up to date, then the book is definitely out before it should be, and I can clearly use one of the many resources out there already. There are two many *large* changes still happening to the API to make this book useful. Well, useful isn't the correct term, but it could be wrong very, very shortly.

Re:A bit early for a book? (1)

mumrah (911931) | more than 8 years ago | (#15995953)

My copy of Google Map Hacks is already outdated and it was published this year.

Re:A bit early for a book? (1)

Frosty Piss (770223) | more than 8 years ago | (#15996849)

Can't see the need for it when you have an active mailing list and sites such as mapki available.

The purpose of books like this is to make money for the publisher. That is the "need".

Save yourself $5.95 by buying the book here! (0)

Anonymous Coward | more than 8 years ago | (#15995482)

Save yourself $5.95 by buying the book here: Beginning Google Maps Applications with PHP and Ajax [amazon.com] . And if you use the "secret" A9.com discount [amazon.com] , you can save an extra 1.57%!

how about www.mapki.com (3, Informative)

Corporate Gadfly (227676) | more than 8 years ago | (#15995621)

I find Mapki [mapki.com] and Mike William's Tutorials [demon.co.uk] more than sufficient. A quick glance at the API group's mailing list [google.com] also helps.

The maps have memory leaks with extended use.. (0)

Anonymous Coward | more than 8 years ago | (#15995631)

yes they do. read the agreement with google about not being allowed to use the maps for commercial applications. you'll find that after about an hour of using the maps consistantly, explorer and firefox start using a buttload of memory. this book is fine for people who want to whip up a quick map etc.. but i do not reccomend anyone using google maps on anything with extensive reloading of the maps.. just my 2 cents.

Other books, OpenLayers.org and more (1)

Lord Satri (609291) | more than 8 years ago | (#15995774)

Those interesting in the topics should take a look at the Google Maps Hack book (review here [slashgeo.org] ).

Anyone whom have interest in Google Maps API must take a look at the numerous alternatives. Which includes OpenLayers.org [openlayers.org] (which just released v2.0 [narx.net] ). There are various other alternatives, all with different levels of interoperability and compatibility with OGC standards [opengeospatial.org] . On the subject, see slashgeo's web mapping section [slashgeo.org] .
.

Re:Other books, OpenLayers.org and more (1)

cruachan (113813) | more than 8 years ago | (#15996183)

But the problem with map applications is not so much the code, but the data. THE advantage of google maps is that it comes complete with data down to a usable level of detail most of the planet.

Data is the next Intel Inside (1)

Lord Satri (609291) | more than 8 years ago | (#15996748)

There's Microsoft's Live Local and Yahoo! Maps that are also data-filled. But you're right, data is the next intel inside [slashgeo.org] . You can look at OpenStreetMap [openstreetmap.org] , the best open data project amongst the community [osgeo.org] .

Online Mapping is great but... (0)

Anonymous Coward | more than 8 years ago | (#15995782)

Sure these technologies are great but standalone mapping programs are "obsolete"? There are still many applications that require a standalone application. ESRI isn't quite out of business. Anyone actually interested in providing map services on the web should be first using and understanding the current GIS packages. This will keep you from having lots of headaches when it comes to projection issues, etc. There is no need to reinvent the wheel 100 times.

Google's $10,000 fee isnt helping growth. (1)

LibertineR (591918) | more than 8 years ago | (#15996580)

Have a client, a chain of national francised outlets that wanted to use this technology for a branch locator. We were all set to build this with the .NET APIs that Google provides, but when the client caught wind of the licence charge for commercial entities, the project was canned. I fear that this very cool solution is going to remain limited by what Google is asking for licencing.

Sure, they have the right to charge whatever they want, but damm, who is going to adopt it at that rate just to add some cool mapping features? Everyone can use the technologies, but few will spend those dollars on mapping alone. I fear Google maps is doomed to the "Cool-Hacks" purgatory.

Re:Google's $10,000 fee isnt helping growth. (1)

drwho (4190) | more than 8 years ago | (#15997672)

Is this fee required? I thought that it was only if you wanted to have dedicated servers so your commercial app doesn't have to compete with the rabble for the limited google maps bandwidth.

The laternative might be to use Yahoo Maps' new API. I haven't played with it much yet, because I don't want to install any plugins to use it. But lots of folks probably will. This book would be better if it was more even-handed and presented info on yahoo as well.

Still, I'll probably buy it. But not on dead tree, but when the price hits $20 for an ebook I'll spring.

KISS (1)

writerjosh (862522) | more than 8 years ago | (#15996839)

I agree that this book will be quickly out of date, but either Google or a third party really needs to put together a web-based, comprehensive, step-by-step instruction guide. The "documentation" http://www.google.com/apis/maps/documentation/ [google.com] that Google has up is very limited and doesn't address even some of the more basic things that a map-newbie like me needs to know (some of the simple things like placing a locator or geocoding wasn't obvious to me). I had to search the forums, etc to get the answers I needed, and even then it wasn't that easy. What would be nice is a comprehensive application that builds everything one would need to create a map (hint hint programmers). Some kind of GUI that's super easy that says: put locator here. Add satellite/map/hybrid options. Create clickable marker...etc. And viola, the code is generated and you cut and paste into your page.

Re:KISS (0)

Anonymous Coward | more than 8 years ago | (#15996878)

If you can't figure out how to do the basics from the Google documentation, perhaps it's because you're an idiot?

Another PHP and AJAX book which one is better? (1)

stry_cat (558859) | more than 8 years ago | (#15999175)

Has anyone checked out "Ajax And Php: Building Responsive Web Applications (Paperback)" [amazon.com] If I can only afford one of these books, should I get this one or the one reviewed here on /.

Re:Another PHP and AJAX book which one is better? (1)

GeckoX (259575) | more than 8 years ago | (#16008449)

Did you REALLY just ask that question?

OK, I'll make it _real_ simple for you, one question is all I need answered:

Are you interested in learning mapping using google maps API, or are you interested in learning AJAX with PHP?

Given the answer to that question, I sure do hope you can figure out the rest on your own. If not, I highly suggest neither.

Torrent (0)

Anonymous Coward | more than 8 years ago | (#16000716)

Anyone have a torren for this?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?