Arnd, Thanks a lot, It works. You helpled a lot and I appreciate it. <br><br><div class="gmail_quote">On Wed, Feb 24, 2010 at 1:21 PM, Arnd Wippermann <span dir="ltr"><<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">1. you have to reproject your vector data
(</font></span><span><font color="#0000ff" face="Arial" size="2">with EPSG:900913 and EPSG:4326 it is possible without
proj4js)</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span></span><font face="Arial"><font color="#0000ff"><font size="2"><span>2</span>. you have to add your vector layer to your
map</font></font></font></div></span></div></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">3. you have to center the map</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">//! set projections for transformation your vectors (before
wkt_f.read)<br> wkt_f.internalProjection = new
OpenLayers.Projection("EPSG:900913");<br>
wkt_f.externalProjection = new
OpenLayers.Projection("EPSG:4326");<br></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">//! add vector layer<br>
index_map.addLayer(hood_vector);<br></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">//! set MouseDefaults for navigation</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">index_map.addControl(new
OpenLayers.Control.MouseDefaults());<br></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">//! center map<br>
index_map.setCenter(new OpenLayers.LonLat(lon, lat),
zoom);<br></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">that should show your map.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span><span><font color="#0000ff" face="Arial" size="2">Arnd</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left">
<hr>
</div>
<div dir="ltr" align="left"><font face="Tahoma" size="2"><b>Von:</b>
<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a> [mailto:<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>] <b>Im Auftrag
von </b>ethio info<br><b>Gesendet:</b> Dienstag, 23. Februar 2010
21:51<br><b>An:</b> <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Betreff:</b> Re:
[OpenLayers-Users] Beginner issue<br></font><br></div>
<div></div></div><div><div></div><div class="h5">Sorry to keep pestering you, but does anyone know what I am doing
wrong? <br>if anyone can make this work, and tell me how to fix it, I would be
very grateful.<br><br>thanks<br><br>
<div class="gmail_quote">On Sun, Feb 21, 2010 at 3:23 PM, ethio info <span dir="ltr"><<a href="mailto:info.ethio@gmail.com" target="_blank">info.ethio@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I understand what you are saying but my previous request was
rejected because it was over the size limit.<br>Here it
is:<br><br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<a href="http://www.w3.org/TR/html4/loose.dtd" target="_blank">http://www.w3.org/TR/html4/loose.dtd</a>"><br><html><br><head><br>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"
/><br><br> <meta http-equiv="X-UA-Compatible"
content="IE=EmulateIE7"><br><br><br> <!-- GLOBAL
JAVASCRIPT --><br> <script src="<a href="http://www.latimes.com/includes/projects/js/menu.js" target="_blank">http://www.latimes.com/includes/projects/js/menu.js</a>"
type="text/javascript"></script><br> <script
src='<a href="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ" target="_blank">http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ</a>'></script><br>
<script src="<a href="http://www.openlayers.org/api/OpenLayers.js" target="_blank">http://www.openlayers.org/api/OpenLayers.js</a>"></script><br><br>
<script type="text/javascript"><br>
<br><br><br>var index_map;<br>var wkt_f = new
OpenLayers.Format.WKT();<br><br>function load_index_map()
{<br> <br></div>// var max_extent = new
OpenLayers.Bounds(860986,-4383204,5870363,3600489); //working but no
woreda's<br> var max_extent = new
OpenLayers.Bounds(660986,-4383204,4870363,3600489);//not
working <br>
<div><br><br> var options = {<br>
projection: new
OpenLayers.Projection("EPSG:900913"),<br>
units: "m",<br> maxResolution:
156543.0339,<br> maxExtent:
max_extent,<br> minZoomLevel:
10,<br> maxZoomLevel:
10,<br> controls:
[]<br> };<br><br> // Firing up the map
object<br> index_map = new OpenLayers.Map('index-map',
options);<br> <br> // Google terrain
map<br> var gphy = new OpenLayers.Layer.Google("Google
Terrain", {<br> type:
G_PHYSICAL_MAP,<br> "sphericalMercator":
true<br> });<br> <br>
index_map.addLayer(gphy);<br></div>
<div> index_map.addControl(new
OpenLayers.Control.LayerSwitcher());<br></div>
<div> index_map.addControl(new
OpenLayers.Control.MousePosition());<br>
<br><br> // Setting the feature style<br>
var template = {<br> strokeColor :
'#2262CC', <br> strokeWidth:
2,<br> strokeOpacity:
0.9,<br> fillColor : '#2262CC',
<br> fillOpacity : 0.3,
<br> pointRadius :
3,<br> strokeLinecap:
"round"<br> };<br><br> // Assigning the
feature style<br> var style = new
OpenLayers.Style(template);<br> var style_map = new
OpenLayers.StyleMap({<br> 'default':
style, <br> 'select':
{<br> fillColor:
'#2262CC',<br>
fillOpacity: 0.75<br>
}<br> });<br></div>
<div> var hood_vector = new
OpenLayers.Layer.Vector("Wereda");<br><br> ar
hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026
8.8274792477, 39.3135039775 8.748488041,
39.3016324666 8.742095689, 39.3036871512
8.7357033371, 39.269899005 8.6920983646,
39.2315448931 8.6608214995, 39.2265223308
8.645982111, 39.2479823696 8.6108241751,
39.2249242428 8.589135838, 39.2221846634
8.5756662392, 39.2306316999 8.5656211146,
39.257114301 8.5601419558, 39.2502653525
8.5464440587, 39.2139659251 8.5220161421,
39.1744703218 8.4606039034, 39.0858905871
8.385037171, 39.0758454626 8.3950822956,
39.0381762455 8.399419963, 39.0363498593
8.5128842107, 39.0671701278 8.5432478827,
39.0655720398 8.5562608849, 39.0872603769
8.5968979797, 39.0874886751 8.6528310595,
39.10415445 8.6825098366, 39.0982186945
8.6939247509, 39.1075789242 8.7101339291,
39.1603158281 8.742095689, 39.1840588498
8.7877553461, 39.1767533046 8.8019098398,
39.2014095194 8.8146945437, 39.2057471869
8.8039645243, 39.2199016805 8.8012249449,
39.2461559833 8.8299905288, 39.2710404964
8.8224566854, 39.2968382026 8.8274792477
)))');<br>hood_polygon_371.data = {'slug':' 371', 'name': '371'};<br><br>var
hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625
9.3384108099, 39.5290175587 9.3116999105,
39.510068801 9.2838475198, 39.522853505
9.2751721849, 39.4963709039 9.2509725667,
39.5105253976 9.2502876718, 39.5089273096
9.2354482833, 39.5290175587 9.2133033496,
39.5598378272 9.2203805965, 39.5456833335
9.1938979954, 39.5376928935 9.1470968469,
39.5771884968 9.0621698849, 39.5447701403
9.0523530586, 39.4872389725 9.0171951227,
39.461212968 9.0137706484, 39.4299361029
9.0452758117, 39.4004856241 9.0596586037,
39.3701219522 9.1025786813, 39.3758294093
9.126321703, 39.3498034048 9.1690134823,
39.2920439386 9.1770039223, 39.281085621
9.1865924503, 39.2514068439 9.2676383415,
39.2509502473 9.3203752454, 39.2584840907
9.3308769665, 39.266702829 9.3265392991,
39.3011758701 9.2909247666, 39.3253754883
9.3107867174, 39.3824500596 9.293664346,
39.434045472 9.3477710396, 39.4589299851
9.3511955139, 39.506872625 9.3384108099
)))');<br>hood_polygon_260.data = {'slug':' 260', 'name': '260'};<br>var
hood_vector = new OpenLayers.Layer.Vector("
<div>Wereda");<br>(hood_vector.addFeatures([hood_polygon_260,hood_polygon_371);<br>
var lon = 4387103;<br> var lat =
1007363;<br> var zoom = 0;<br></div></div>
<div>
<div></div>
<div>function show_hood(feature) {<br>
var selectedFeature = feature;<br>
var hood_name = <a href="http://selectedFeature.data.name" target="_blank">selectedFeature.data.name</a>;<br>
var hed =
document.getElementById('hood-index-hed');<br>
hed.innerHTML = 'Click to visit ' +
hood_name;<br> }<br>
<br> function hide_hood() {<br>
var hed =
document.getElementById('hood-index-hed');<br>
hed.innerHTML = "Select one of L.A.&rsquo;s 114
neighborhoods";<br> }<br>
<br> function click_hood(feature) {<br>
var selectedFeature = feature;<br>
var url = '/mapping-la/neighborhoods/neighborhood/' +
selectedFeature.data.slug;<br>
index_map.destroy();<br>
window.location.href = url;<br> return
false;<br> }<br> <br>
var hover_control = new OpenLayers.Control.SelectFeature(hood_vector,
{<br> hover: true,<br>
onSelect: show_hood,<br>
onUnselect: hide_hood,<br>
onHoverClick: click_hood<br>
});<br><br>
index_map.addControl(hover_control);<br>
hover_control.activate();<br>}<br>
</script><br><br> <br></head><br><body
onload="load_index_map()" ><h2 style="font-size: 3em;
">Woreda's</h2> <br> <div
class="bottomborder pad5vert clear"
style="margin-right:20px;"></div>
<br> <!-- the dynamic hed --><br>
<h1 class="pad10vert" id="hood-index-hed" >Select one of the 583
woreda's </h1><br> <!-- The index
map --><br><div id="index-map" style="width: 1200px; height:
900px"></div><br></body><br></html><br><br><br></div></div>
<div>
<div></div>
<div>
<div class="gmail_quote">On Sun, Feb 21, 2010 at 10:40 AM, Nicholas
Efremov-Kendall <span dir="ltr"><<a href="mailto:n.e.kendall@gmail.com" target="_blank">n.e.kendall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>you really need to post more code than that for someone to be able to
help you. Are you using proj4.js to change your projection? OL only uses a
few projections/coordinate systems natively.<br><br></div>
<div class="gmail_quote">
<div>On Sun, Feb 21, 2010 at 2:39 AM, ethio info <span dir="ltr"><<a href="mailto:info.ethio@gmail.com" target="_blank">info.ethio@gmail.com</a>></span> wrote:<br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div></div>
<div>Hi, Please take a look at this site:<a href="http://projects.latimes.com/mapping-la/neighborhoods/" target="_blank">http://projects.latimes.com/mapping-la/neighborhoods/</a>.<br>I
have copied the source and cleaned it up of ads and so forth and have put
in my data and I just can not see the overlay on the Google map. <br>I
will include the changes I made below. The only thing I can think of
that is blocking my overlay is the bounds. Basically, I want the
country of Ethiopia. <br>Just to complicate things further, my overlay was
showing when I did not use a spherical mercator projection but the overlay
matched what is in Google maps ONLY when I zoomed in. <br>so after reading
some of the issues some people had, I figured I should use what is in the
Mapping LA w/minor changes. <br>Can someone suggest a
solution? BTW, the overlay switch works and gives my overlay as a
check box option to click on but it is not displayed on the Google
map<br>Here are my changes to the Mapping LA Neighborhood
source:<br><br>var max_extent = new
OpenLayers.Bounds(860986,-4383204,5870363,3600489);<br>
index_map.addControl(new OpenLayers.Control.LayerSwitcher());<br><br>var
hood_polygon_371 = wkt_f.read('MULTIPOLYGON
(((39.2968382026 8.8274792477,
39.3135039775 8.748488041,
39.3016324666 8.742095689,
39.3036871512 8.7357033371,
39.269899005 8.6920983646,
39.2315448931 8.6608214995,
39.2265223308 8.645982111,
39.2479823696 8.6108241751,
39.2249242428 8.589135838,
39.2221846634 8.5756662392,
39.2306316999 8.5656211146,
39.257114301 8.5601419558,
39.2502653525 8.5464440587,
39.2139659251 8.5220161421,
39.1744703218 8.4606039034,
39.0858905871 8.385037171,
39.0758454626 8.3950822956,
39.0381762455 8.399419963,
39.0363498593 8.5128842107,
39.0671701278 8.5432478827,
39.0655720398 8.5562608849,
39.0872603769 8.5968979797,
39.0874886751 8.6528310595,
39.10415445 8.6825098366,
39.0982186945 8.6939247509,
39.1075789242 8.7101339291,
39.1603158281 8.742095689,
39.1840588498 8.7877553461,
39.1767533046 8.8019098398,
39.2014095194 8.8146945437,
39.2057471869 8.8039645243,
39.2199016805 8.8012249449,
39.2461559833 8.8299905288,
39.2710404964 8.8224566854,
39.2968382026 8.8274792477
)))');<br>hood_polygon_371.data = {'slug':' 371', 'name':
'371'};<br><br>var hood_polygon_260 = wkt_f.read('MULTIPOLYGON
(((39.506872625 9.3384108099,
39.5290175587 9.3116999105,
39.510068801 9.2838475198,
39.522853505 9.2751721849,
39.4963709039 9.2509725667,
39.5105253976 9.2502876718,
39.5089273096 9.2354482833,
39.5290175587 9.2133033496,
39.5598378272 9.2203805965,
39.5456833335 9.1938979954,
39.5376928935 9.1470968469,
39.5771884968 9.0621698849,
39.5447701403 9.0523530586,
39.4872389725 9.0171951227,
39.461212968 9.0137706484,
39.4299361029 9.0452758117,
39.4004856241 9.0596586037,
39.3701219522 9.1025786813,
39.3758294093 9.126321703,
39.3498034048 9.1690134823,
39.2920439386 9.1770039223,
39.281085621 9.1865924503,
39.2514068439 9.2676383415,
39.2509502473 9.3203752454,
39.2584840907 9.3308769665,
39.266702829 9.3265392991,
39.3011758701 9.2909247666,
39.3253754883 9.3107867174,
39.3824500596 9.293664346,
39.434045472 9.3477710396,
39.4589299851 9.3511955139,
39.506872625 9.3384108099
)))');<br>hood_polygon_260.data = {'slug':' 260', 'name': '260'};<br>var
hood_vector = new
OpenLayers.Layer.Vector("Wereda");<br>(hood_vector.addFeatures([hood_polygon_260,hood_polygon_371);<br>
var lon = 4387103;<br> var lat =
1007363;<br> var zoom = 0;<br><br><br></div></div>
<div>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br><br>
</div></blockquote></div>
<div>
<div></div>
<div><br><br clear="all"><br>-- <br>Nicholas Efremov-Kendall<br>Fulbright
Student 2009-2010, Ukraine<br><a href="mailto:nefremov@artsci.wustl.edu" target="_blank">nefremov@artsci.wustl.edu</a><br>c/o Halyna Yerko<br>Balzaka
92a, Kv 27<br>02232<br>Kyiv, Ukraine<br>(mob)
+380963576524<br></div></div></blockquote></div><br></div></div></blockquote></div><br>
</div></div></blockquote></div><br>