Bing Map Drawing Tool Module - Initialization - bing-maps

i have a Geolocalisation Web Application and i Use Bing Maps as a Front End Map Tool, for the back end, i would be able to edit points and polygons, for this, i am using Bing Map Drawing Tools Module.
My Goal is to use the same map to add / or edit a shape depending on what is the content of certain textbox.
So, there is any way to init the map by a default drawn shape and pushpin?

Related

How to draw lines on google map Flutter

Here I am using Google Maps and I want to draw this kind of line based on that I want to filter the data on a map. i don't know what I can use to draw these kinds of lines
Here is an example of what I need
www.zillow.com

LeafletJS offline support

Am using leafletJS for showing offline maps using openstreet tiles and its working fine. We need to use atlast tool to generate tiles and able to do that. But how to handle case that if generated tiles are not matching with latitude and longitude which are coming from services then in leaflet is showing markers but background map tiles are not loading (I know it wont match so its not showing :) ) but is there any way / approach which I can figure out that latitude and longitude provided are not in range or in sync of map tiles generated for offline so that I can show meaningful message to end users and accordingly user / admin will take actions?
I can imagine three approaches to this:
If you know which tiles you are generating (often times you are generating tiles in a bounding-box) you could hardcode that bounding-box and check if the given coordinate is inside or outside before adding the marker or jumping to the coordinate.
This question (leaflet - tile loading - error event) details a way to detect when Leaflet can't load a tile (for whatever reason: tile does not exist, no connection, ...). Maybe you could inform the user using that tileerror event.
You could convert the coordinate into its Slippy-Tilename equivalent and try to manually request that tile from your server / storage (for example using the Fetch-API). The conversion process is detailed (with code!) on the Openstreetmap-Wiki (https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#ECMAScript_.28JavaScript.2FActionScript.2C_etc..29)

Is it possible to add a watermark in MapBox vector tiles?

A client would like to add their URL as a brand/watermark within a MapBox tiled vector layer in MapBox Studio, so that the watermark appears wherever the tiled vector layer is displayed. (One possible use-case is to discourage competitors from stealing that tiled layer in their own maps.)
Is it possible to add a watermark to a tiled layer in MapBox, and ensure that it's visible at least once in every view?
I tried adding a duplicate copy of a polyline dataset as a Symbol Layer, and labelling it with the client's URL using the Text Field option. This works but has the side effect of preventing the labels from appearing on the original copy of the line layer.
It is not possible to add a single occurrence of a watermark to a map style in Studio in the way that the Mapbox watermark is displayed on a map, but there are alternative approaches to achieve what you are looking to do.
If the underlying goal is to prevent competitors from using a particular map style (and hence an underlying tiled layer), the best approach is to set scopes and URL restrictions on the Mapbox access tokens being used to access the map style in a public environment. You can find more useful information about token management and access tokens in general in the Mapbox documentation. This approach could be used in conjunction with adding a branded "watermark" on the client side -- for example, placing a fixed div in the corner of a web map loaded with GL JS. Although this watermark obviously isn't included in the style itself, setting a URL restriction on the access token used to load the map would prevent others from accessing the same map with that token on other domains.
You could also experiment with adding a low-opacity background-pattern to relevant layers in the map style itself. This property could be used to mimic a traditional watermarked effect, where a particular logo is placed on an image at multiple regular intervals.

Mysterious "markers" using Leaflet (with Omnivore and the MapQuest plugins)

I'm using Leaflet (with omnivore and the MapQuest tile plugins) to display a map with colored polygons. The map and polygons look/work fine, but there are these mysterious blue markers everywhere.
There's nothing in the JS about markers at all, and if I comment out the polygon.addTo(map); line, the markers disappear. So they're definitely related to the polygons, even though they're not directly positioned on the polygons.
Any idea why the markers are appearing, or how I can make them disappear?
SOLVED: It turns out that the problem was that I'm using MSSQL's ".Reduce(n)" function to simplify the polygons (for performance), and if you simplify the polygons too far, the results have "Point(...)" items in them - which leaflet renders as markers!
Now, off to figure out why MSSQL is turning things into points...
Welcome to SO!
Most probably your polygon variable is a Leaflet GeoJSON Layer Group built by the omnivore plugin, and the data you feed it with contains "Point" type geometries.
If you do not specify anything special to handle these points, Leaflet will render them with this default blue marker icon.
In that case, you could simply filter out those point features, whether after omnivore processing (use the ready event) or using a custom GeoJSON Layer Group with its filter option. There should be other posts describing such solutions.
See e.g. Mapbox: Filtering out markers in a Leaflet Omnivore KML layer
If you are not in this case, you would have to provide more information for people to be able to help you. Typically code that you use to build your polygon layer and sample data.

Custom drawing layer in Mapbox GL JS (and Leaflet)

I'm starting research to add a user feature to an existing map built in Mapbox GL JS (wrapped in an Angular 2+ application). What I need to do, is allow a user to be able to draw and rotate ellipses and text labels over the top of a map, and be able to save screen captures of the result.
I'm coming into this with no experience in Mapbox or Leaflet, so I have a lot to figure out. My first goal is to determine if I can do this in Mapbox directly (with a plugin?), of if I will need to render a canvas over the top of my map with some third-part drawing library (I have a lot of experience with those).
The obvious advantage to doing this in Mapbox directly would be that we might still be able zoom and pan.
The Mapbox-gl-draw library lets the user author features in a map, but probably not to the extent you need.
If the features the user creates don't need to live "in map space" (ie, the map is static, and the labels are statically positioned over the top, for printing), working directly on a canvas will give you much more flexibility. You'll also have access to a much wider variety of libraries.