Creating custom Google (or OpenLayers?) maps - google-maps

I'm currently working on a project which maps items to a physical location within a building. We have a map created in our GIS system (ArcGIS), and are able to resolve items to the appropriate shape ID on this map.
We want to create a web map using one of the APIs such as Google maps or Open Layers in order to display this info, directing the user to the correct location on the map, and ideally highlighting the particular location (for example using a shaded polygon), or at least identifying it with some sort of marker.
However we're very new to all of the online mapping APIs, and are finding it pretty overwhelming at the moment. All we really want is a flat map with our own custom imagery - we dont really care about geo-referencing, or projections etc.
Does anyone have any tips or info about how we might go about this? Even just general pointers would be helpful - it's hard to know where to look when there's so much info out there!
Cheers

If you are using ArcGIS Server, use ArcCatalog to expose your data as a WMS.
If you do not have an ArcGIS Server license, you can use MapServer or GeoServer to do the same (i.e expose as a WMS).
OpenLayers has support for adding WMS layers. See their examples section for sample code.
Cheers

OpenLayers can handle your own custom imagery maps without any problems.
You can check out this example:
http://openlayers.org/dev/examples/image-layer.html
And of course you need to read the API documentation

If you are using ArcGIS to creat eyour map, then use ArcGIS Server to serve up the maps online. Then use ArcGIS JavaScript API to build your web application. There are several out-of-the-box templates as well as easy-to-use examples for performing basic actions such as pan, zoom, select, highlight, redlining, etc.
Create your map service, then add your custom Map as a Dynamic Map Service or a Tiled Map Service (if you've cached it). Perform a Find (or Query if you have more than one feature you want to highlight). Add the Graphic from the FindResult to your GraphicsLayer.
Here's a more complete example.

You could also look at MapGuide OS and (if you don't have studio) Maestro. It is a server side application that will take in SHP files from Arc easily. The only downside IMO is that the built in search and reporting functionality is rather limited but can be extended via the API (C#, PHP and Java) that and it is rather centralized with a persistent process on the server (which can make debugging exceedingly fun).
The fusion/flexible (or whatever they heck they call it) layouts are based on the OpenLayers API but is still relatively new. And you can publish as a WMS or WFS I believe (I haven't done it personally).

If using ArcGIS Server, you can also expose your imagery and feature layers via a REST endpoint that can be consumed by OpenLayers. Check out James Fee's blog post on the topic.

Related

Migrating cordova app from Google Maps to OSM

I need some directions. My mobile app is heavily dependent on Google Maps for the the following components: maps, geocoding/geolocation, autocomplete, distanceMatrix and directionsMatrix. However, I am running into quota issues and they are getting worse and worse. I need an as reliable solution but without the quotas and am considering OSM. I have my own api unix server I can install OSM too but I am having a hard time finding a complete install package.
Everything I read is separate packages to install and configure for each of the components I need to migrate to. Is there not a comprehensive OSM package that has all of the components built into it? I keep thinking there should be a single package that is all integrated to work together but I can't find one.
If one exists please point me in the right direction. If one doesn't can you please recommend the best, and easiest to use, OSM packages that meet my listed of required components? Thanks in advance.
OSM consists of several components. First there is the map data which can be seen as raw data, no software involved. Depending on your goals you will likely need a database software, which is usually postgresql. For drawing a map you will need a renderer, for address searching a geocoder, for directions a routing software and so on.
Showing a map: Use one of the available tile providers or render your own tiles
Geocoding: Take a look at Nominatim or Photon. Photon is based on Nomatim and adds some features, most importantly autocompletion. There are other search engines available as well.
Routing: GraphHopper or OSRM. More alternatives available, check the list of OSM online routers.
Similarly to tile servers, most of these softwares can be either run by yourself or accessed via various online providers. Online providers usually have quotas whereas running your own software is solely limited by your own resources.

Anyone know how to integrate WMS map data into a web app?

I want to build a web app that uses map data provided by a WMS server. I want to load that data into a database then display filtered data on a live map.
I'm a beginner programmer and I haven't been able to find much info on how to implement this online. I work with WMS alot in GIS software but don't know what goes on behind the scenes. For the website map I plan to use google maps API or mapbox.
A Web Mapping Service (WMS) serves rendered map images, not the data underlying the rendered map image. You could cache these images if you want, but it is not at all trivial to extract vector features from them, and in most cases attempting to do so would violate the terms of service of the WMS.
Instead you might try looking for a WFS (Web Feature Service), which serves vector features. Again be wary of terms of service.
One approach to doing this would be to use a map server that supports WMS for the delivery and a database (or, e.g., GeoTIFF format files) for storage of the data being served. GeoServer is one such map server that can be used to accomplish that, using their WMS capabilities. If you have WMS services you are already familiar with you can use GeoServer to proxy acccess to those existing services as a way to get started. I did this using OpenLayers to render WMS layers on top of Google Maps base layers when I was getting started with WMS.

I need to make a clean, nice-looking map for a presentation based on a Google map. Any easy way to do this?

I want to make a very clean map that only shows relevant information - e.g., only the streets that matter. I was going to just draw a map while looking at Google's, but that turned out to be very slow. Is there any way to make this easier, perhaps with some combination of mapping software and Google's API?
(If I should of put this on another SE site, please tell me)
Building upon Suvi's nice answer.
There is a very useful open-source project that collects street data for the entire globe. It's called OpenStreetMap. On their website you can extract the specific street data you need. It only takes a few clicks and bam! you got the map you need. Their data can also be accessed (perphaps easier for some) from here and here. Those links can provide you with the shapefile(map) that you need. Your newly aquired map can then be loaded in the free QGIS software that was mentioned. There you can easily select the streets you are interested in.
When you mean you want to only show "streets that matter", you are out of luck with using Google Maps. Because you have no control over the ROADMAP data that google provides. Now what you can do, is use another mapping software such as ArcGIS or Quantum GIS (which is free). Both these softwares allow you to load road data shapefiles, and you can query (select) which roads you want to display and customize the look of it to your liking.
If you want a quick approach (without having to download softwares), I believe ArcGIS has an online portal which allows you to display information you want on top of their base maps. You will still need the shapefile for your streets though. Check this link out, make yourself an account and experiment around with it http://www.arcgis.com/home/. If you click on the Map tab, it takes you to a screen which should allow you to upload shapefiles.
You said you were ' going to just draw a map'. If all you need is a very clean map, you can consider using iMap Builder which is a mapping software supports both map shape files, and custom Google maps. I have used to create some simple map projects before and worked great for me. You can use their pre-made map templates which shows just the map outlines without any details, you can then add routes / points / mouse-over speech bubbles etc as you need.

Openstreetmap Data with OpenLayers vs google maps?

I am trying to use a map provider. I wanted to know which of these is better.
Until now, all the reading I have done indicates OSM data is better. Mainly for, It's OPEN & off-line usability. But couldn't get a proper take on which Layer to use.
How are the API supports?
Which tiles to use? (mapnik used by openstreetmaps seems to be nice & free)
OpenStreetMaps Tile usage policy(http://wiki.openstreetmap.org/wiki/Tile_usage_policy) does say limited usage.
Which other slippy map layers are good/better with openstreetmaps (free/paid).
My requirements are:
To allow users to query for routes.
To allow users to look for a location based on GPS co-ordinates.
Add a layer to display a set of some of my data based on location.
OpenSteetMap data is better in the sense that:
It's free and open.
the data is being provided by thousands of users and it's more precise and covers much more information than Google maps data. (except for the satellite view which doesn't exist in OSM).
Tiles - depends on the application you would like to build. For a small (not a high number of http requests) web application you can use the web API which is highly documented and reliable.
The real advantage of OpeenStreetMap, is using OSM data and a number of tools to built you're own OSM server (a good article here), and to use Mapnik or Osmarender tiles render engines for generating you're own tiles that can be used on web applications.
This is why the Tile limitation usage exists, because they recommend hosting and using your own server tiles.
The main difference between Mapnik and Osmrender is that the second exports SVG tiles format.
Information regarding your requirements:
A. routing
It's possible to use OSM data to build a routing web application.
Here is a list of routing programs and web services on OpenStreetMap wiki
Here are two websites using routing with OpenStreetMap which can give you an idea of how it's used on web applications:
yournavigation.org
openrouteservice.org
B. search by gps coordinates
You can use reverse-geocoding and query the OSM database for GPS coordinates the Nominatim tool.
Here is a web application using this tool.
C. layers
Here is the list of webmaps libraries that you can use.
OpenLayers can work with Mapnik generated tiles and it's a commonly used library (with no server-side dependencies) with plenty of docs. It's a framework that can be used as well with Google maps, so it's worth giving it a try.
Polymaps integrates well with SVG tiles generated be Osmarender. It can generate display / diagrams / of specific areas based on marker - user location.

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