Changeset 9243 in ntrip for trunk/BNC/src
- Timestamp:
- Nov 11, 2020, 3:08:20 PM (4 years ago)
- Location:
- trunk/BNC/src/map
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/map/bncmapwin.cpp
r9239 r9243 121 121 } 122 122 QString location = QString("%1, %2, %3, %4").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8).arg(mapWinDotSize).arg(mapWinDotColor); 123 _webView->page()->runJavaScript(QString(" gotoLocation( %1 )").arg(location));123 _webView->page()->runJavaScript(QString("initialize( %1 )").arg(location)); 124 124 } 125 125 -
trunk/BNC/src/map/map_osm.html
r5385 r9243 18 18 var markers; 19 19 var marker; 20 var icon; 20 var icon; 21 21 var traceIcon; 22 22 var fromProjection; … … 28 28 function initialize(lat, lon, mapWinDotSize, mapWinDotColor) { 29 29 dotSize = mapWinDotSize; 30 dotColor = mapWinDotColor;30 dotColor = mapWinDotColor; 31 31 32 32 if (dotSize > 10) dotSize = 10; … … 38 38 fromProjection = new OpenLayers.Projection("EPSG:4326"); // WGS 1984 39 39 toProjection = new OpenLayers.Projection("EPSG:900913"); // Spherical Mercator 40 zoom = 0; 40 zoom = 0; 41 41 42 42 map.addLayer(new OpenLayers.Layer.OSM()); … … 48 48 49 49 var sizeT = new OpenLayers.Size(dotSize,dotSize); 50 var offsetT = new OpenLayers.Pixel(-sizeT.w/2, -13);51 if (dotColor == 1) {50 var offsetT = new OpenLayers.Pixel(-sizeT.w/2, -13); 51 if (dotColor == 1) { 52 52 traceIcon = new OpenLayers.Icon("qrc:///map/reddot.png", sizeT, offsetT); 53 }54 if (dotColor == 2) {53 } 54 if (dotColor == 2) { 55 55 traceIcon = new OpenLayers.Icon("qrc:///map/yellowdot.png", sizeT, offsetT); 56 }56 } 57 57 58 58 markers = new OpenLayers.Layer.Markers("Markers"); 59 59 marker = new OpenLayers.Marker(position, icon); 60 60 markers.addMarker(marker); 61 61 62 62 map.addLayer(markers); 63 63
Note:
See TracChangeset
for help on using the changeset viewer.