<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=484412415-02112012>it seems, that the url is
hardcoded in </SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=484412415-02112012><PRE>OpenLayers.Layer.OSM.Mapnik.initialize</PRE></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=484412415-02112012><FONT color=#0000ff
size=2 face=Arial>and not changeable by the constructor.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=484412415-02112012><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=484412415-02112012><FONT color=#0000ff
size=2 face=Arial>you have to overwrite OpenLayers.Layer.OSM.Mapnik to provide
your url.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=484412415-02112012><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=484412415-02112012><FONT color=#0000ff
size=2 face=Arial>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2
face=Arial></FONT><BR> </DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von
</B>robertico<BR><B>Gesendet:</B> Freitag, 2. November 2012 14:05<BR><B>An:</B>
openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> [OpenLayers-Users]
Openlayers and Mapnik loading problem<BR></FONT><BR></DIV>
<DIV></DIV>I'm running my own Openstreetmap server with Mapnik installed.<BR>I
tried a simple example but the tiles are not loaded.<BR>The online version works
(without the Mapnik part and the url's)<BR>I can load a tile from my server e.g.
http://xxx.xxx.xxx.xxx/osm_tiles/18/137213/91823.png<BR><BR>Please provide me a
working sample. (I'm stuck for days)<BR><BR>My code;<BR><PRE><!DOCTYPE HTML>
<html>
<head>
<title>OpenLayers Simplest Example</title>
</head>
<body>
<div id="Map" style="height:600px"></div>
<script src="OpenLayers.js"></script>
<script>
var lat = 47.35387;
var lon = 8.43609;
var zoom = 18;
var fromProjection = new OpenLayers.Projection("EPSG:4326"); // Transform from WGS 1984
var toProjection = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection
var position = new OpenLayers.LonLat(lon, lat).transform( fromProjection, toProjection);
var url = ["http://xxx.xxx.xxx.xxx/osm_tiles/${z}/${x}/${y}.png",
"http://xxx.xxx.xxx.xxx/osm_tiles/${z}/${x}/${y}.png",
"http://xxx.xxx.xxx.xxx/osm_tiles/${z}/${x}/${y}.png"];
map = new OpenLayers.Map("Map");
var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", url);
map.addLayer(mapnik);
var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(position));
map.setCenter(position, zoom);
</script>
</body>
</html></PRE><BR>
<HR align=left width=300>
View this message in context: <A
href="http://osgeo-org.1560.n6.nabble.com/Openlayers-and-Mapnik-loading-problem-tp5013551.html">Openlayers
and Mapnik loading problem</A><BR>Sent from the <A
href="http://osgeo-org.1560.n6.nabble.com/OpenLayers-Users-f3910695.html">OpenLayers
Users mailing list archive</A> at Nabble.com.<BR></BODY></HTML>