openlayers-users-gis – [OpenLayers-Users] How may I use transform ? – msg#00321 – Recent Discussion OSDir.com

Leigh, Maybe the problem is in this line: var sphermerc = new OpenLayers.Projection('900913'**), Is missing the 'EPSG:' before the 900913 Fernando G. Norte BHte - MG cel: +55 31 9119 8814 ------------------------- MSN e Gtalk # fnorte@xxxxxxxxx 2011/12/22 Leigh Holcombe <,lholcombe@xxxxxxxxxxxxxxxxx>, >, Hello, >, I'm trying to add some WGS84 points to a spherical mercator map. After >, studying examples and reading some documentation, I've been led to believe >, that the following code should work. And yet, it does not. >, >, var wgs84 = new OpenLayers.Projection('EPSG:**4326'), >, var sphermerc = new OpenLayers.Projection('900913'**), >, // vector points overlay >, var pointslayer = new OpenLayers.Layer.Vector('**Points Layer', { >, styleMap: stylepoint, >, displayInLayerSwitcher: false >, }), >, // define the points >, var start = new OpenLayers.Geometry.Point(-**157, 21), >, start.transform(wgs84, sphermerc), >, var startfeature = new OpenLayers.Feature.Vector(**start), >, pointslayer.addFeatures([**startfeature]), >, >, map.addLayer(pointslayer), >, >, This isn't all of the code, but I'm pretty sure it's the only part that >, isn't working. I think the reason I can't figure this out is that I don't >, quite understand how transforming 'in place' works. Which version of >, 'start' is being passed to OpenLayers.Feature.Vector: the original, or the >, transformed? >, >, Code ideas and/or explanatory speeches (of any length) would be greatly >, appreciated. >, >, Thank you, >, Leigh Holcombe >, >, >, ______________________________**_________________ >, Users mailing list >, Users@xxxxxxxxxxxxxxx >, http://lists.osgeo.org/**mailman/listinfo/openlayers-**users<,http://lists.osgeo.org/mailman/listinfo/openlayers-users>, >, _______________________________________________ Users mailing list Users@xxxxxxxxxxxxxxx http://lists.osgeo.org/mailman/listinfo/openlayers-users 2011/12/22 Pierre Muckensturm <,pierre@xxxxxxxxxxx>, >, markers.addMarker(new >, OpenLayers.Marker(OpenLayers.Projection.transform( >, OpenLayers.Point(775133.95,6907235.95), >, EPSG:2154,EPSG:900913),icon2), >, Pierre, The transform() receive the from and to Projection object, not the string name of the projection. Try something like this: markers.addMarker(new OpenLayers.Marker(OpenLayers.Projection.transform( OpenLayers.Point(775133.95,6907235.95), new OpenLayers.Projection('EPSG:2154'), new OpenLayers.Projection('EPSG:900913')),icon2), bon chance, Fernando G. Norte BHte - MG - Brazil cel: +55 31 9119 8814 ------------------------- MSN e Gtalk # fnorte@xxxxxxxxx _______________________________________________ Users mailing list Users@xxxxxxxxxxxxxxx http://lists.osgeo.org/mailman/listinfo/openlayers-users Hi List, I'm having problems with the ArcGIS server tile cache layer. The problem is that when I zoom in and pan around the map seems to hop around. Here is an example I adjusted the openlayers auto configure example. http://arctictiger.iriscouch.com/lbs/_design/app/agserver.html If you zoom in say 3 times you will see things start hopping around. Any ideas about what I'm doing wrong? Thanks in advance Tom _______________________________________________ Users mailing list Users@xxxxxxxxxxxxxxx http://lists.osgeo.org/mailman/listinfo/openlayers-users 2011/12/22 Pierre Muckensturm <,pierre@xxxxxxxxxxx>, >, markers.addMarker(new >, OpenLayers.Marker(OpenLayers.Projection.transform( >, OpenLayers.Point(775133.95,6907235.95), >, EPSG:2154,EPSG:900913),icon2), >, Pierre, The transform() receive the from and to Projection object, not the string name of the projection. Try something like this: markers.addMarker(new OpenLayers.Marker(OpenLayers.Projection.transform( OpenLayers.Point(775133.95,6907235.95), new OpenLayers.Projection('EPSG:2154'), new OpenLayers.Projection('EPSG:900913')),icon2), bon chance, Fernando G. Norte BHte - MG - Brazil cel: +55 31 9119 8814 ------------------------- MSN e Gtalk # fnorte@xxxxxxxxx _______________________________________________ Users mailing list Users@xxxxxxxxxxxxxxx http://lists.osgeo.org/mailman/listinfo/openlayers-users Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 22, 2016 @ 1:10 am