<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>1. you have to reproject your vector data
(</FONT></SPAN><SPAN class=796451119-24022010><FONT face=Arial color=#0000ff
size=2>with EPSG:900913 and EPSG:4326 it is possible without
proj4js)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010></SPAN><FONT
face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=796451119-24022010>2</SPAN>. you have to add your vector layer to your
map</FONT></FONT></FONT></SPAN></DIV></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>3. you have to center the map</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff 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 class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>//! add vector layer<BR>
index_map.addLayer(hood_vector);<BR></DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>//! set MouseDefaults for navigation</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>index_map.addControl(new
OpenLayers.Control.MouseDefaults());<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>//! center map<BR>
index_map.setCenter(new OpenLayers.LonLat(lon, lat),
zoom);<BR></DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2>that should show your map.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN><SPAN class=796451119-24022010><FONT
face=Arial color=#0000ff size=2>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796451119-24022010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>Von:</B>
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <B>Im Auftrag
von </B>ethio info<BR><B>Gesendet:</B> Dienstag, 23. Februar 2010
21:51<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> Re:
[OpenLayers-Users] Beginner issue<BR></FONT><BR></DIV>
<DIV></DIV>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">info.ethio@gmail.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV class=im>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 class=im><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 class=im> index_map.addControl(new
OpenLayers.Control.LayerSwitcher());<BR></DIV>
<DIV class=im> 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 class=im> 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 class=h5>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 class=h5>
<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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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></BODY></HTML>