NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi, As per subject, is it possible to learn how to get custom development for a map application I need? The functionality I need is as follows; 1. Point Digitizing - when a user clicks on the map two form fields are updated with the Latitude-Longitude. 2. Lines/Polygon Digitizing - when a user clicks multiple times on the maps a TextArea form field is updated with the coordinates. The list grows the more the map is clicked. Also need some simple buttons to react to the map, eg: Delete Last Point, Clear Map, Edit lines. Once these features are used the coordinates will be updated in the form field. 3. Finally I will need a simple Geocoder even over the map or as part of the map for the user to quickly find their location.

I want to do this with OSM in a web browser... the coverage for my area is far better than Google or Bing. If anyone has any examples of this type of app I'd be very grateful. Looking to hire a developer to help out here too so please get in touch.

Thanks,

Brendan

This question is marked "community wiki".

asked 03 Feb '11, 10:58

brendanc's gravatar image

brendanc
1111
accept rate: 0%

Thanks a lot - will need a developer to do this for me. D you know if a developer network is accessible?

(03 Feb '11, 11:16) brendanc

Well there is http://lists.openstreetmap.org/listinfo/osm-professional but that is really low traffic and probably doesn't reach many developers. Your best bet is probably to write up the requirements and your contact details on a webpage and post a link in the comments here.

(03 Feb '11, 18:01) petschge
1

You'll find a list of OSM developers at http://switch2osm.org/providers/ .

(28 Dec '12, 08:38) Richard ♦

USE THIS CODE.....

<!DOCTYPE HTML>

<html>

<head>
    <title>CLICK HANDLER</title>
    <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
    <script>
        var map,vectorLayer,selectMarkerControl,selectedFeature;
        var lat             =   21.7679;
            var lon            =    78.8718;
            var zoom        =   5;
        var curpos = new Array();
        var position;

            var fromProjection = new OpenLayers.Projection("EPSG:4326");   // Transform from WGS 1984
            var toProjection   = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection

            var cntrposition       = new OpenLayers.LonLat(lon, lat).transform( fromProjection, toProjection);

        function init()
        {
                map = new OpenLayers.Map("Map",{
                            controls: 
                            [
                                        new OpenLayers.Control.PanZoomBar(),                        
                            new OpenLayers.Control.LayerSwitcher({}),
                            new OpenLayers.Control.Permalink(),
                            new OpenLayers.Control.MousePosition({}),
                            new OpenLayers.Control.ScaleLine(),
                            new OpenLayers.Control.OverviewMap(),
                                    ]
                              }
                                );
                var mapnik      = new OpenLayers.Layer.OSM("MAP"); 
                var markers     = new OpenLayers.Layer.Markers( "Markers" );

            map.addLayers([mapnik,markers]);
            map.addLayer(mapnik);
            map.setCenter(cntrposition, zoom);

            markers.addMarker(new OpenLayers.Marker(cntrposition));

            var click = new OpenLayers.Control.Click();
            map.addControl(click);

            click.activate();
};

OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {               
 defaultHandlerOptions: {
  'single': true,
  'double': false,
  'pixelTolerance': 0,
  'stopSingle': false,
  'stopDouble': false
 },

 initialize: function(options) {
  this.handlerOptions = OpenLayers.Util.extend(
   {}, this.defaultHandlerOptions
  );
  OpenLayers.Control.prototype.initialize.apply(
   this, arguments
  );
  this.handler = new OpenLayers.Handler.Click(
   this, {
    'click': this.trigger
   }, this.handlerOptions
  );
 },

 trigger: function(e) {
  var lonlat = map.getLonLatFromPixel(e.xy);
  lonlat1= new OpenLayers.LonLat(lonlat.lon,lonlat.lat).transform(toProjection,fromProjection);
  alert("Hello..."+lonlat1.lon + "  " +lonlat1.lat);

 }

});
</script>
</head>

<body onload='init();'>
    <div id="Map" style="height: 650px" ></div>

</body>

</html>
permanent link
This answer is marked "community wiki".

answered 28 Dec '12, 05:50

Hiren%20Pitroda's gravatar image

Hiren Pitroda
1122
accept rate: 0%

edited 28 Dec '12, 15:24

scai's gravatar image

scai ♦
33.3k21309459

Your question is not OSM specific, but a generic OpenLayers question (or even more generic - since you could also use a different Javascript mapping framework and have OSM tiles display there). An example application that does something like you describe is this Cycle Route Planner; while the list of coordinates is not visible in a text area, it is stored invisibly for later saving and the application would probably require a lot of modification to cater to your needs.

Note that by using OSM to generate a route you are likely creating a "derived work" in terms of the CC-BY-SA license we're currently using, and if you publish that route it will have to be published under that license as well.

permanent link

answered 03 Feb '11, 11:08

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 03 Feb '11, 11:12

You might want too look at OpenLayers. It is the slippy map plugin used for the main page of OpenStreetMap and have support for most of the features you specified.

permanent link

answered 03 Feb '11, 11:10

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×83
×22
×19
×5

question asked: 03 Feb '11, 10:58

question was seen: 44,932 times

last updated: 28 Dec '12, 15:24

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum