[OSM-dev] map disappear on YourS local installation

Anwar Azulfa anwar at troyans.net
Wed Dec 21 04:53:15 GMT 2011

I try install yours on my computer, i have followed reference from

But when i access it via browser, i can't found any map.

then i get idea to pointing js to my map on local computer because i have
own local tiles .

I try to change init function on yournavigation.js with :

 function init() {
           var options = {
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: "m",
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
                                                 20037508.34, 20037508.34),
                numZoomLevels: 16,
                controls: [
                        new OpenLayers.Control.Navigation(),
                        new OpenLayers.Control.PanZoomBar(),
                        new OpenLayers.Control.Permalink(),
                        new OpenLayers.Control.ScaleLine(),
                        new OpenLayers.Control.MousePosition(),
                        new OpenLayers.Control.KeyboardDefaults()

        myFirstMap = new OpenLayers.Map("map",options);
        var newL = new OpenLayers.Layer.OSM("Default", "
http://localhost/osm_tiles3/${z}/${x}/${y}.png", {numZoomLevels: 19});
         if (!map.getCenter()) {
           var center = new OpenLayers.LonLat(116.97,-2.56);
            center.transform(options.displayProjection, options.projection);
            map.setCenter(center, 5);


But i stil l can't find map on it ?

What should i do to solve this ?

M.Iftakhul Anwar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20111221/94a5549e/attachment.html>

More information about the dev mailing list