Where to start with map application [closed] - dictionary

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
i'm trying to desing a new application which allow user see he/her current location on a custom map (office, university compus, etc). but actually i have a couple of question in my mind (i haven't designed this kind of application before). i'm wondering:
How can i draw my own maps, what is the best option for it? there any format that i have to care of, there are any specification about it ?
Once i have my custom map. how can i do to mapping a global position system with the local positions ?
What are the tricks behing zoom on maps ? just differents layers with more or less informations and those layers changes on users demand ?
If a whant to mark some specific points over the map, like a cafeteria, boss's office etc, how can i do that ?
Sorry if my questions are too much generics and dumb, but i really need some clues about this topic because i don't have any idea how to design this kind of application as best as possible. and we don't whant to reinvent the wheel.
I will appreciate any help that you can provide me in order to desing this application

There are a number of approaches you can take to creating a maps application. Which one you use depends on the set of features you want to support, and the degree of control you want to maintain over the product.
If you want something like an embedded google map, then clearly the JavaScript Google Maps API may be best solution. If you need to support further features from the server side, like directions, you can make use of the web services api:
http://code.google.com/apis/maps/documentation/webservices/index.html
If, on the other hand, you essentially need a zoomable map of an area that you can define with markers and borders drawn from your database, and you want complete custom control over this image without having to rely on Google Maps' data or branding, then you can fairly easily build a scalable image either on the client or server, or both.
To start, you will need a set of point coordinates from which to draw your map. These can be derived from the SVG generated by a program like Adobe Illustrator when you draw vector graphics. Thus you could draw your own map in Illustrator and use the generated svg to create your map. In this case you will have to read about SVG and understand how to use it. Raphael.js is an excellent library that offers cross-browser compatible handling of SVG. If your map is of a familiar region, such as a country, you may be able to find SVG coordinates for it already on the web. You could start by grabbing a subset of the data in this file on wikipedia for the country or region you want to map.
Once you have a set of coordinates that define your map areas, you can keep them in a config file that can be read into memory from disk by your application as needed. It's convenient to save this data in the form of a hash, where each set of key-value pairs stores a separate svg 'path', or set of point coordinates that forms a closed shape. These could represent, for instance, the counties in a state.
Once you have the appropriate 'paths' stored in this manner, it is relatively easy to write a wide variety of software implementations.
Check out the imagemagick convert
documentation for the -draw
option for an example of how to
draw a png, jpeg, or gif on your
server from your stored svg paths.
Adam Hooper has some brilliant ideas of what to do with a custom map using SVG on the client side:
http://adamhooper.com/eng/articles/9
Note that you do not necessarily
need to use SVG. Here's an
example of a map drawn on the
server using ImageMagick, with a
highlightable clickmap drawn over it
by the browser, where the
highlighting is handled by the
jquery maphighlight plugin, which
uses the canvas element where it is
supported and VML in its place on
Internet Explorer browsers. All of
these layers (ImageMagick,
client-side click-map, and
client-side javascript highlighting)
are built with straight lines drawn
between point coordinates, so none
of this is actually SVG, and may be
easier to understand. Have a look
at the page source to see how the
click map is drawn, then look at the
maphighlight plugin to understand
what's going on:
http://davidlynch.org/js/maphilight/docs/
A third option, if you need to support more google-maps-like features, but want to add your own map data without using an overlay, is to implement some application of Open Street Maps. If you go to openstreetmap.org, find the area you want to customize, and click the edit tab at the top, you can edit the map as needed for your area. This edits the map data for all users of the Open Street Map service. Then you can get the openlayers javascript from http://openlayers.org/ to render a map on your website from Open Street Maps data that you can freely edit yourself. Also see the OpenStreetMap Wiki that tells you more about the OpenStreetMap movement.

If you don't want to reinvent the wheel, then don't try do do it: take the Google Maps API, add some markers and you're done. Zooming included. They have examples to guide you and there's loads of knowledge about the usage.
All you need is a free API key.
Edit: Your comment in the original question indicates that you want to use a custom overlay over existing maps. That's also possible as this example shows (see docs for custom overlays).

In the effort to not reinvent the wheel (which is definitely a good idea), much of the work of the maps themselves has already been done. The simplest approach will be to integrate Google Maps into your application. To address your individual points:
You don't have to draw your own maps. Tons of them already exist. Unless you're asking about drawing maps of indoor facilities yourself and plotting on those? In which case, how do you plan to approach this from a hardware perspective? GPS won't work well.
You need a piece of hardware that supplies the GPS coordinates. From there, you can just call the API to plot it.
Already done.
Calls to the API. Just provide the location (address, GPS, whatever you have) to the API. GPS will be more accurate, of course. But I'm pretty sure there's a geolocation service as part of the API and you can store the coordinates locally and adjust them manually if they're inaccurate.
If I'm off-base from your actual idea here, let me know. "Maps" is, of course, vague.

Related

Leaflet.Editable for Shiny?

I'm trying to get to grips with Leaflet in Shiny for R. I'm happy with handling the display capability. My main aim is for the user to be able to interact with the user interface to be able to add their own points and polygons and to edit geographies and their attributes when they need to, too. The layers will be pre-existing in most cases.
The extension Leaflet.Editable does everything I need it to do from what I can see, but unless I am mistaken does not (yet?) appear to be implemented in the Leaflet for R library. Leaflet.Draw which is included in leaflet.extras for R appears to be an alternative.
My question is:
is there an implementation of Leaflet.Editable that I've simply missed?
If there isn't, what do people recommend for drawing / editing points and polygons, including editing attributes?

How to create HERE maps

HERE maps for certain city like Chennai, India is very limited. I understand that lot of information can be added so that it will benefit end-user.
My question, can I create a new map using HERE and allow my version of maps to be downloaded? If yes? How can I do this
HERE Maps is a proprietary software so you can not try to recreate your own version of it. Trying to recreate a Map API by yourself is a cool idea, but it is also a good idea to build something on top of a technology or an application that is already existing. There are other Map API's out there like OpenStreetMap and Google Maps that allows user to create and add data about POIs (Point of Interests) and/or locations. The data on these apps are also open source, that is why the community are encouraged to contribute data of their own on top of the Application.
TIP: If you are really onto it here is a page that documents the stuffs the happened behind the scenes in developing the HERE Maps: http://360.here.com/2014/12/11/video-craft-science-behind-maps/

I want to create some very specific heatmaps. Can it be done?

First of all, I'd like to explain what I want to achieve.
Imagine that I own a leaflet drop business. I cover a city, which is divided into 10 sections.
I want to leaflet-drop those 10 sections systematically, and have a heatmap that shows when they were last done (ie, if an area was done just last week, it would show up as green, but if it was done 6 months ago, it would be red.)
However, occasionally, I would do additional leaflet drops within the area, that I wouldn't want to be included in the data above - these would then show up on the heatmap in, say, blue.
I've been looking at OpenLayers, and it seems like it can do what I want - but I'm not really that technical, so need advice. OpenLayers has the ability to select specific areas with a polygon tool, which is exactly what I need - but how can I input this data, which will change frequently?
I currently monitor coverage of the territories with an Excel spreadsheet, but would like this heatmap system in addition to that.
So - any ideas?
Heck, for a tool for you to use yourself, you could use a drawing package like Inkscape. Scan a map of the area, paste that in, draw polygons for the areas you care about, and then every time you do a drop, change the colour of the polygon.
OpenLayers is generally used by software developers to aggregate geospatial/map data from various sources into web applications used by many users. OpenLayers can do what you want but not without writing a fair amount of JavaScript code. You might be looking more for a tool like ESRI's ArcCatalog, although it is probably too powerful for your needs.
I did a quick google search of "best map drawing tools" and found SmartDraw, for example. I have no affiliation with SmartDraw, nor do I know if it's any good, but it seems like this type of software would be more suited to your needs.
For what you say would be more useful a desktop tool as e.g. http://www.qgis.org/ (is open source and free)

Get the next direction help provided GPS location

I am working on proof of concept project that is an augmented reality based navigation system. Basically, it is supposed to provide users a video of real scene with additional navigational signs that are created with the use of GPS location.
The thing I need to do is not a complete useful system but rather a proof of concept. There were mainly two tasks that I had to do. First real image of the scene is processed to determine the road in it, and with the use of GPS I will place the navigational sign like turn right, go straight on the road. The challenge I have here is how i can fetch the required navigation information. I considered Google Maps Api but it requires you to have your google host. I also made some research about how to get directions from it, but it seems that results are not very well structured for my purposes. I mean I need something like having a certain number of outputs and rigorously defined (e.g. turn right, turn left, etc) but its output is very unstructured. How do you think I can achieve this task. Thanks for any help.
This Link might help for Google Map Location extraction
https://developers.google.com/maps/documentation/javascript/streetview
You can use Layar , or other available AR sdks(Metaio, QUalcomm also provide one ) for AR related Overlays
Good luck !

Openlayers vector layer

I want to have a vector layer of the world, which shows the country borders, states and their names in English. Is there a layer that exists that I can control the colours?
Cloudmade doesn't let me quite do this, nor does openstreetmap and a bunch of others. I'm thinking I might need to create a raster image and overlay that except I dont know where to get an accurate EPS/vector map I can edit and overlay.
Running out of options!
You have different options depending of your needs:
The easiest one is to use a public
WMS service that offers the
information you need. You can check
catalogues like this one or a
Google search like this. If
your are lucky to find a service
that suits you, just add it as a WMS
layer in OpenLayers as described in
this example.
If you can't find a public service, you will have to serve the
geographic data yourself. You have
to find a dataset of the world
countries (the most common formats
are ESRI shapefile and KML).
If you find a shapefile (try here), you will
have to serve it via a map server like
MapServer or Geoserver.
Both are pretty straightforward to
set up, but choose the one that suits you best (MapServer is a CGI and Geoserver is Java-based). Once you have configured a WMS service with the countries data, you can add it to your OpenLayers app following the previous example.
If you can't or don't want to use a map server and you have a KML file of the world countries, you can also add a vector layer to OpenLayers from a KML file, as described in this example. Be careful, because all geometries will be rendered in the user's browser (with SVG or VML) and for large datasets, this can be a performance issue. Check this example to see it in action.
I hope this give you a few clues.

Resources