
Remove "OpenStreetMap" text attribution on an embedded OSM map
- or -
Post a project like this1198
€50(approx. $58)
- Posted:
- Proposals: 2
- Remote
- #3604926
- Awarded
Description
Experience Level: Entry
Hello,
I'm using OSM for displaying map in an Android application. This works fine, but I want to remove the "OpenStreeMap" text attribution showing up on the map.
Here is the HTML code for displaying the map:
OpenLayers Vector Linestring Example
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
epsg4326 = new OpenLayers.Projection("EPSG:4326"); // WGS 1984 projection
projectTo = map.getProjectionObject(); // The map projection (Spherical Mercator)
var pointStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
pointStyle.strokeColor = "green";
pointStyle.strokeWidth = 3;
pointStyle.pointRadius = 5;
var lineStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
lineStyle.strokeColor = "red";
lineStyle.strokeWidth = 3;
// Set map center
var lonLat = new OpenLayers.LonLat(%1, %2).transform(epsg4326, projectTo);
var zoom = 10;
map.setCenter (lonLat, zoom);
var vectorLayer = new OpenLayers.Layer.Vector("Overlay");
// Create line
var points = [
new OpenLayers.Geometry.Point( %3, %4 ).transform(epsg4326, projectTo),
new OpenLayers.Geometry.Point( %5, %6 ).transform(epsg4326, projectTo)
];
// Build line feature
var line = new OpenLayers.Geometry.LineString(points);
var lineFeature = new OpenLayers.Feature.Vector(line, null, lineStyle);
// Add feature for point 1
var pointFeature1 = new OpenLayers.Feature.Vector(points[0], null, pointStyle);
// Add feature for point 2
var pointFeature2 = new OpenLayers.Feature.Vector(points[1], null, pointStyle);
// Build features array
map.addLayer(vectorLayer);
// Add features to layer
vectorLayer.addFeatures([lineFeature, pointFeature1, pointFeature2])
Attached a screenshot showing the "OpenStreetMap" text to be removed.
Thanks.
I'm using OSM for displaying map in an Android application. This works fine, but I want to remove the "OpenStreeMap" text attribution showing up on the map.
Here is the HTML code for displaying the map:
OpenLayers Vector Linestring Example
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
epsg4326 = new OpenLayers.Projection("EPSG:4326"); // WGS 1984 projection
projectTo = map.getProjectionObject(); // The map projection (Spherical Mercator)
var pointStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
pointStyle.strokeColor = "green";
pointStyle.strokeWidth = 3;
pointStyle.pointRadius = 5;
var lineStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
lineStyle.strokeColor = "red";
lineStyle.strokeWidth = 3;
// Set map center
var lonLat = new OpenLayers.LonLat(%1, %2).transform(epsg4326, projectTo);
var zoom = 10;
map.setCenter (lonLat, zoom);
var vectorLayer = new OpenLayers.Layer.Vector("Overlay");
// Create line
var points = [
new OpenLayers.Geometry.Point( %3, %4 ).transform(epsg4326, projectTo),
new OpenLayers.Geometry.Point( %5, %6 ).transform(epsg4326, projectTo)
];
// Build line feature
var line = new OpenLayers.Geometry.LineString(points);
var lineFeature = new OpenLayers.Feature.Vector(line, null, lineStyle);
// Add feature for point 1
var pointFeature1 = new OpenLayers.Feature.Vector(points[0], null, pointStyle);
// Add feature for point 2
var pointFeature2 = new OpenLayers.Feature.Vector(points[1], null, pointStyle);
// Build features array
map.addLayer(vectorLayer);
// Add features to layer
vectorLayer.addFeatures([lineFeature, pointFeature1, pointFeature2])
Attached a screenshot showing the "OpenStreetMap" text to be removed.
Thanks.

Franck L.
100% (5)Projects Completed
3
Freelancers worked with
3
Projects awarded
36%
Last project
16 Jul 2022
France
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies