Upgrade to Google Maps version 3, or go to OpenLayers? - google-maps

I manage the development of some academic web mapping software for authoring collections of geographic data. It's a fairly simple interface for creating historic maps. The project is based on Google Maps v.2, and because v.2 is going to be discontinued in 2013, we thought we'd bite the bullet early and upgrade to v.3.
It turns out that's a big job that requires completely rethinking how the map part of our application works. We have to rewrite all our custom Gmap controls, restructure several parts of the application, and a few other big changes--for example, v.3 doesn't integrate with Google Earth as well as v.2, and we use Google Earth a lot. Because of this, and because we're starting to use more features that Gmap doesn't support natively (like WMS maps), I've been wondering if it might be worth switching from Gmap to OpenLayers. From what I understand, OpenLayers has all the features of Google Maps, has native support for WMS and supports many more data formats, lets us use all the Google imagery anyway, and works with KML.
My question to the community is for people who know OpenLayers and Google Maps: can you give me an idea of how the workload for upgrading from Gmap v.2 to v.3 compares to a complete port from Gmap v.2 to OpenLayers? And what other downsides should we be aware of?
One of our biggest concerns: we use Google Earth a lot. If we went to OpenLayers, we'd have to synchronize Earth and OpenLayers ourselves, but it sounds like that's what we'd have to do in Gmap v.3 as well. From what I've read, OpenLayers doesn't have native support for Google Earth or any kind of 3D geobrowser, but there are some projects (like this) that try to bridge the gap. How much of a headache would this be?

Very interesting question!
Upgrade to newer version of Google Maps should be less time consuming because you already have working code and even though you make will have to make big changes you should be able to reuse some parts of the codebase. That's only my guess, because it's hard to be more precise without seeing the code :)
You should still take a look at OpenLayers. You mentioned that you already need WMS support and probably there are more features out there that OpenLayers supports and Google Maps doesn't. OpenLayers supports a wide variety of datasources, is open and follows OGC standards. It has support for Google Maps, and if you one day decide to change to Bing, Yahoo or your own maps you will only need to make minor changes to your code.

I was in the same situation. I took a look at openlayers and started implementing some of the functionality in openlayers. I was able to replace SOOOOO much google maps api code with just a few lines in openlayers. So i kept going, in no time i had re-developed in openlayers and cut down the javascript required to do so by more than half! I am also able to do much more! exporting, importing from all sorts of formats is now just lines of code rather than man lines. OpenLayers all the way!

Related

google earth vs. google map api: For a specific environment

I am about to start a new project which will be used about 80% through non-mobile devices like desktops and laptops and 20% through mobile devices. And yes, I want to use KML capabilities too, use JQuery for all my JS work and do not want users to download any plugin separately.
I have implemented two projects already using Google Maps API blissfully unaware of Google Earth API. Now I started reading about the two and nothing is clear about what is the right choice. I even referred to posts on this site so please do not mark this as a duplicate.
Google's documentation on Google Earth API states:
Welcome to the developer documentation for the Google Earth API. The Google Earth Plugin and its JavaScript API let you embed the full power of Google Earth and its 3D rendering capabilities into your web pages. Just like in the Google Maps API, you can draw markers and lines—but in 3D!
Well, with that statement from the horse's mouth, it confused me even more. Why would anyone use Maps API then. Can someone with experience in both these tools, give some definite statements for the specific environment I have described? The earlier posts do not give convincing answers.
I believe when I last looked Google Earth support in the browser is implemented through the use of Web GL which will severely limit your browser support and I think eliminate mobile devices.
While Earth may be prettier Maps is more performant and arguably stable and I would think it would be the logical choice for you in this case.
This page contradicts some of this but requires the use of a plugin which you specify you do not want.
For information on using KML layers with the Maps API see here.
Here is how I understand the situation.
There were two similar but different products co-existing for a long time:
2D Maps born on web
3D Earth born on desktop and brought to the web as plugin.
This caused a lot of confusion.
It would be beneficial to unite the two, but that only became possible recently with WebGL.
Last week Google released new Maps having Earth integrated.
Unfortunately, I was not able to find any documentation about this integration yet.
But, still, my answer is: use Maps and eventually you'll get Earth for free.

Does google maps API provide elevation details for buildings?

I am a final year Computer Science undergraduate student from India. I want to create a WPF application that displays 3D buildings like in the latest Google maps 5 for android. This will be the basis of my final year project. I have some questions before i start working on this.
Should I make it desktop or web based, or should I use the web to store some metadata and render the data in the desktop software?
For 3D display of buildings in a map area, is WPF enough or will I need knowledge of XNA and Direct X too?
Will this violate Google Maps TOS if I use Google Maps API? (I want to do something Google Maps does not provide in India) Is using Bing Maps a better option?
Is it feasible to read building elevations and rendering them using the above mentioned Maps APIs? Is it that the elevation data available through Google Maps API is only for the terrain and not for individual buildings?
I have three months to complete this project and have given details of the technologies I intend to work with.
Will I need in-depth knowledge of any more technologies for this?
Excuse me if I missed some detail. I am posting this from my cellphone using opera mobile. It's time we have an android client for stackoverflow.
1) That is entirely up to you. As you don't specify your target user then it is hard to say what the best way to deliver the application is. For example, if you want to be able to widely distribute it and have a high compatibility then perhaps a web-based application would be best. Conversley, if you require high performance and are targeting a specific os, chip-set, etc then a stand-alone application may be better.
2) Again, it is hard to say. WPF can certainly render 3d objects and may provide you with everything you require. If again you require more complex rendering you may also want to look at later versions of Direct3D, which can help a lot with things like HDR textures, Multi-threading, etc.
3) I am not a lawyer so I can't say for sure - even if I If I were it would still depend on the specifics of your implementation. That said, the bing maps section 2 (i) seems pretty good for you - Academic use seems pretty open as long as you make the application available publicly without restriction. The Google TOS seems more restrictive to me at least.
4) To me that would be a breech of the Google Maps/Earth TOS - The section on Restrictions on use seems pretty clear...But again, I am not a lawyer so I can't say for sure...

developing location/map based web site

I wanna start developing a map-based web site.
At first I ordered a regulat Gps device just to test the site, later on I would like to use Iphone's gps and other cell devices.
So I need something pretty generic.
I searched the web for map-based development framework and come up with too many of them :
Geo server, Map server, Open layers, Geoext , Google maps's api , and more.
I'm not a seasoned web developr (more of a c++ kind of guy) so I need something pretty straightforward , though robust at the same time.
Moreover, I need one which is free, and won't have licensing problem down the road.
At first I just need basic capabilities as displaying the gps data on my web site in real-time.
Can someone experienced recommend one ?
Thanks
Client
I'd go with OpenLayers - this is an opensource JavaScript client library, similar to the Google Maps API, or Bing API. However OpenLayers will free you of any licensing worries, or changing APIs as the source is available and can be modified - this is not the case with the Google/Bing/Yahoo APIs. You can however use the data from these services as layers in OpenLayers and drop them if they suddenly become filled with adverts or have commercial restrictions.
Have a look at examples to see if there is one you can use to make your first test application - http://openlayers.org/dev/examples/
GeoExtJS is a collection of extra tools and widgets that work with OpenLayers, built on top of another JavaScript framework ExtJS - also open source. ExtJS is mainly used for building user interfaces - data entry forms, grids etc. using JavaScript, to display in the browser.
If you are looking for tree structures to switch layers on and off and other more advanced UI widgets then GeoExtJS is worth looking into.
Server
If you are only displaying points then you can create dynamic KML or GeoJSON on your web server and reference this in OpenLayers. There are libraries in all languages that you can build on. Python has become a key languages in geospatial technologies, and has GeoJSON libraries you could script with.
GeoServer and MapServer are both server-side programs that allow you to serve out spatial data from databases with symbology, labelling etc. If you are having lots of different datasets then its worth spending time setting this up.
MapServer is written in C++ so it is probably easier for you to try this - however you may be able to get away without needing any specialist server side software, especially if your data consists of X,Y / Lon,Lat values that can be easily plotted as points.
For the beginning (you said that you need to show gps position in a real time) I think that Google Maps are good option here. This solution has very simple API and community support is also an advantage here (I've never compared with something else but I have good experince with GMaps and its tutorials/resources). This is for the client side, for server side any web framework should do the work (I use Django and it also have dupport for some geo things - mentioned later in this answer).
You need probably to build application that follows this rules:
Your GPS device sends data to your server(web application) periodically, data is stored in a db.
Users use browser to display data with map (eg. Google Map) which updates position periodicaly on some scheduled interval (eg. ajax calls to the server for the most current position). Each time response is recieved map need to be updated.
I don't know if there are more specialized solutions for this case.
If you need to improve your application and add some features you need to consider some more sophisticated geo frameworks. I have heard some positive opinions on GeoDjango, mainly because it can be easily incorporated with Django(which is very easy web framework to learn and it has a lot of capabilities).
All technologies I mentioned here are free.
I can recommend using the Google Maps API to render your maps in a browser. You can find my reasons in this answer.
The current version of the API has support for getting geo-location information for mobile devices.
I use Bing Maps for mobile. Mainly because its fast, and provides much better looking maps, 3d models, and satellite views for the UK than Google maps does.
I have also had issues with Google changing their service to provide some enhancements and it breaking my app, where at least with the Bing API theres a bit more compatability considered for existing apps. Not that I dont like the Google maps, I do. Its a backup service for me..
I generate maps from both providers, Bing as the primary, Goole secondary... this means that if ones offline of not working, which happens, my users still get to use my app.
Heres a link to Bing Maps Dev on a WIndows Phone for example
I'd take a look at Cloudmade. They have a number of API's, free options, paid options and use OpenStreetMap which for many places is one of the most accurate mapping solutions out there.
free , open source:
www.openstreetmap.org,
u can build ur own server as well using the same technolgogy:
http://weait.com/content/build-your-own-openstreetmap-server
API: http://wiki.openstreetmap.org/wiki/OpenLayers
Although its still in draft form, HTML5 will be supporting Geolocation API. Most major browsers and hand held devices should be supporting it in the near future and should make life a lot easier for developers who want a service independent solution. You would however still need a mapping service like google maps if you need to display locations.
function showMap(position) {
// Show a map centered at (position.coords.latitude, position.coords.longitude)
}
// One-shot position request.
navigator.geolocation.getCurrentPosition(showMap);
EDIT:
Its already supported in several major browsers:
Mozilla Firefox: supported in Firefox
3.5 and later versions.
Chrome: Supports thru Google Gears
Geolocation API
Opera: Supported in
nightly builds
Safari: Support is
coming soon in the IPhone’s Safari
browser.
Internet Explorer:
experimental support available from
IE8.

A crowdsourced Map Edit application for enviornmental cause

I want to create an application where users can mark on map location of polluting factories. Google map provides a MAP editor feature. We would like to have our own website like www.toxic-map.org where people could mark these locations. What would be the best approach for this?
Additionally we should be able to backup this database which could be cross checked or used for other purposes.
This will enable us to have little accurate census of such entities and thereby helping us in the fight against these environment harming, illegal factories. Most of our work is focused on developing countries of Asia.
Edited: Google maps is one of the options. I am open to other possible solutions as well. I am looking at something we could do quick prototyping in.
Thank you in advance!!
On the client side, I recommend you to have a look at OpenLayers, a free and open source web mapping framework released under a BSD-style License. It is completely written in Javascript and offers a lot of functionality, including the features that your application may need (Add markers to the map, drag them to adjust the locations, ...).
It also supports dozens of different geographic data formats and services such as WMS, KML or Google Maps.
If you are worried about licensing issues regarding the use of Google Maps, you can use other global data sources like OpenStreetMap or a public WMS if they provide enough coverage of your area of interest.
On the server side, I agree with the answer provided by Daniel Vassallo. I will just add a little detail and recommend you to serve the markers in a standard format natively supported by OpenLayers like KML, GeoJSON or GeoRSS. It will make really easy to draw the markers on the map.
Looks like a really interesting project, I hope you are lucky starting it up.
I seem to remember that there are restrictions to what you can do with the coordinates if you enter them through Google's interface, but if that doesn't bother you then sure, Google might be the way to go. (It may just pertain to geometrical figures entered into Google Earth or something like that.)
Google seems to be in line with your ideology anyway, as they're doing a lot of green power development. Might even be a selling point.
But if you can input the data separately and have Google Maps just display it for you then I wouldn't think they could hold claim to the data.
I think your best bet is to use the Google Maps API instead of the map editor in My Maps.
With some basic JavaScript, you will be able to allow users to drop markers on the polluted locations they would want to tag.
You will need a database on the server-side, and a thin application layer that:
Accepts and validates new markers added by users.
Serves the markers from the database to the browser.
You may want to use AJAX to interact between the browser and the application layer.
I think this type of project would be an excellent candidate to be hosted on the Google App Engine. You will be able to leverage on the simplicity of the webapp framework, and the Google Datastore appears to fit well.
As a side-note, you might be interested in checking out the Heat Map API for Google Maps. I think heat maps would look good in a project like this.
The approach is this:
1. User can drag the marker to the location of toxic factory.
2. A simple form opens to enter details of the toxic factory.
3. The latitude, logitude and other datails are then saved in database.
Please refer www.loppee.com They have a similar solution where user can mark the location of people or places of interest. Loppee uses LeafletJS javascript framework. It is a simple framework. You would be able to develop quick prototype. LeafletJS.com has simple and easy to use code samples.
Additionally, you can enable Geolocation and IP triangulation. Refer: Longitude and latitude value from IP address

Mapping API for Flex/Actionscript application?

I'm working on an application in Flex will utilize mapping features. I have experience with the Google Maps API in Flex, but it seems sort of limited to me (as compared to other APIs and the Javascript API). In particular, I'm interested in developing some clustering (grouping places together to prevent too many points from being on the map at once, slowing rendering). I'm wondering if anyone has any recommendations on which API to use/look into, and perhaps which APIs have features unique to them. I think visually some of the other providers have "nicer looking" maps as well. What I'm checking now:
Google Maps API
Have a lot of familiarity, but might be missing some key features.
Yahoo Maps API
Don't know a lot about it. Seems to handle a lot of markers very well. Looks really nice visually. 50K requests per day for free is less than google.
ArcGIS SAMPLES
I've had my eye on this for awhile. Seems really robust. Great samples index. Also seems to autoscale markers based on the zoom depth. They also seems to have a lot of data-based maps you can access.
MapQuest API
Looks to have great docs and features. Noteable are the "decluttering" and I think it has clustering.
Going through this awesome list right now, but I'd love to know if any of you Flex (or other lang!) devs have any experience with mapping and would like to give some advice.
We are using Flex Maps by Igor Costa. It lets you use Nokia Here Maps or Bing Maps.
It is based on ModestMaps AS3 and you can personalize your markers or polygon overlays.
It also works on mobile devices using Adobe AIR SDK.
I hope this component will be added to the Apache Flex SDK as a map component.
There is also good Flash API UMapper. Look at their site
http://www.umapper.com/pages/products/#umap
They allows you to use many map providers, like MS, Yahoo, Google, Cloudmade, OpenStreetMap, ESRI, Digital Globe.