Coder Social home page Coder Social logo

rickyruiz / vue-azure-maps Goto Github PK

View Code? Open in Web Editor NEW
24.0 6.0 14.0 16.54 MB

Integrate Azure Maps in your Vue application

Home Page: https://rickyruiz.github.io/vue-azure-maps/

License: MIT License

JavaScript 7.23% HTML 0.29% Vue 52.60% TypeScript 39.88%
vue typescript azure azure-maps frontend

vue-azure-maps's People

Contributors

rickyruiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vue-azure-maps's Issues

Custom Map Marker

Is there a way to add a custom Image Sprite as a map marker with this library?

for example: this.map.imageSprite.add('plane', 'assets/plane.png');

see here for reference.

Microsoft logo and controls not rendered within map

@rickyruiz Love the project keep up the good work. You should make some issues and label them help wanted so others can start to plugin.

I'm getting a weird issue where the Microsoft logo and anything else I add to the map renders outside of the top right corner. I'm not entirely sure if it is something I'm doing or not but any help would be appreciated.

screenshot-d2fc8b0f ngrok io-2019 11 24-15-57-58 (1)

Here is the same issue in a stripped down codesandbox https://codesandbox.io/s/vue-azure-map-render-error-ys4vt

Azure Map Clustering

How to allow clustering of the data source ?
I don't see anything about this in your DataSource component.

example (AzureMapCodeSamples):

// Create a data source and add it to the map.
datasource = new atlas.source.DataSource (null, {
    // Tell the data source to cluster point data.
    cluster: true,
    // The radius in pixels to cluster points together.
    clusterRadius: 45,
    // The maximium zoom level in which clustering occurs.
    // If you zoom in on this, all points are rendered as symbols.
    clusterMaxZoom: 15
});

Support typescript?

Is this support typescript? If it is can you provide some sample app that you created with it

Duplicate `azure-maps-control` dependencies

Our package.json includes both azure-maps-control and vue-azure-maps.

When inspecting our decency graph via "webpack bundle analyzer" I noticed that vue-azure-maps was quite sizable (larger than azure-maps-control even).

After digging into the files generated in the build for this project, it seems that azure-maps-control in it's entirety is included in the bundle.

img

My suspicion is that this is caused by import * as atlasJs from 'azure-maps-control/dist/atlas.min.js' in install.ts.

Why was this method of importing used vs import * as atlas from 'azure-maps-control'?

Additionally, the application imports azure-maps-control's CSS. Which results in duplicated CSS.

Any thoughts on this?

Cannot read property 'atlas' of undefined

Thanks for this project, It looks really promising. But when I try to integrate the plugin in a project that uses TypeScript I get a strange error.

I am following the instructions for implementing the plugin from the documentation
(https://rickyruiz.github.io/vue-azure-maps/).

But when I try to load a view which has the AzureMap component in it I get an error saying:
Error in mounted hook: "TypeError: Cannot read property 'atlas' of undefined"

It seems like it's something that has with TypeScript to do. Because if I set up a new default test project with the Vue CLI that doesn't use TypeScript it works as expected. But if I set up the same test project and tell it to use TypeScript I get the error.

It seems strange though because the error does not appear to me to be a typical error you would get if it was TypeScript that was the problem. So maybe there is something obvious that I am missing?

Create Route from <AzureMapUserPosition /> to <AzureMapPoint />

Hi @rickyruiz,

This is superb work, really good, please keep it up. ๐Ÿ‘

I'm trying to create a Route from the co-ords in to another long/lat so I need to get the co-ords out of these components to pass to the Route REST API. Is there a nice, clean way to get the co-ords from the components, maybe through the $_azureMap injection?

Many thanks,

Jon.

Can't display the map, it displays an error

TypeError: Cannot read property 'atlas' of undefined at VueComponent.initializeMap

// app.js
import VueAzureMaps from 'vue-azure-maps'
import 'vue-azure-maps/dist/vue-azure-maps.css'

Vue.use(VueAzureMaps, {
key: '#############################',
});

// my-component-map.vue


<script> import { AzureMap } from 'vue-azure-map' export default { components: { AzureMap, }, } </script>

Using AzureMapPopup

Hello @rickyruiz ,

I'm trying to use the component AzureMapPopup, but the map keep being displayed as an inline resource.
image

The message displayed on the console suggest using an injection for this, but i couldn't find an example

image

This is how I'm using the components:
image

[Supported Browser] Error on Firefox 68.0.1

Hi,
I would like to know on which browser you are testing your plugin?
Because at first I was only testing on chrome and I had no problem.
But recently I wanted to test on Firefox but I have errors with the promises.
I removed all my dependencies to see which one was making this mistake.
It seems to be yours.
A polyfills story, apparently.
It is natively supported by Firefox since its version 58.
https://caniuse.com/#search=promise

Can you give me the compatibility of the browsers with your plugin please
and make a correction if you find the same thing as me?

master is not working

I tried to clone this repo and did npm i and changed key but it is not working
error in console
Error: Failed to retrieve the style definitions: TypeError: Failed to fetch
at eval (webpack-internal:///./node_modules/azure-maps-control/dist/atlas.min.js:3844)
at async Promise.all (:8080/index 1)

webpack-internal:///./node_modules/azure-maps-control/dist/atlas.min.js:3766

Multiple AzureMapDataSource or AzureMapBubbleLayer layers

It's not a bug, but I'm not sure how to add multiple layers to the map. I've got a working example in js and html that I'm trying to convert to vuejs.

I've added a AzureMapDataSource & AzureMapBubbleLayer component to the map, and can add points to the map ok. But in my previous example, we were grouping datapoints together based on a category, and changing the colour of the markers.

Is this possible in this projects current state?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.