ymaps.ready(init);
function init() {
var myMap = new ymaps.Map('map', {
center: [55.753994, 37.622093],
zoom: 9
});
ymaps.geocode('владивосток', {
results: 1
}).then((res) => {
let firstGeoObject = res.geoObjects.get(0);
let coords = firstGeoObject.geometry.getCoordinates();
console.log(coords);
ymaps.borders.load('RU').then((geojson) => {
console.log(geojson);
}, (e) => {
console.log(e);
});
});
}
<VirtualHost *:80>
ServerName searchengine.localhost
ServerAlias www.searchengine.localhost
ServerAdmin webmaster@localhost
DocumentRoot /home/user/projects/searchengine.localhost
ProxyVia On
ProxyRequests Off
ProxyPreserveHost on
<Location />
ProxyPass http://localhost:5265/ retry=0 timeout=30
ProxyPassReverse http://localhost:5265/
</Location>
<Location /socket.io>
RewriteEngine On
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:5265/socket.io/$1 [P,L]
ProxyPass http://localhost:5265/socket.io retry=0 timeout=30
ProxyPassReverse http://localhost:5265/socket.io
</Location>
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Proxy>
</VirtualHost>
this.io = io('http://yourhostname.localhost');
<script src="http://searchengine.localhost/socket.io/socket.io.js"></script>
this.io = io('http://searchengine.localhost');
<script src="<%=assetFingerprint('/javascripts/src/mapApplication.js') %>" type="module"></script>
import io from './libs/socket.js';
constructor(params) {
this.bus = eventEmitter.bus;
this.conteiner = params.conteiner;
this.size = params.size;
this.styleColor = params.styleColor;
this.io = io( 'http://searchengine.localhost');
}